![]() | ![]() | ![]() |
| | |||||||
| Math and Physics Discuss the complex nature of mathmatics and physics relating to electronic circuitry. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Experienced Member | Im utterly sick of eagle, so ive started work on a pcb editor and have now got side tracked on the graphics editor element of the project. Does anyone know how to calculate a point that is a specified distance away from another along a line? Ive defined a straight line class in c# that can encapsulate all the maths and its all working nicely appart from this. In the rest of the class, i use y=mx+c and pyt. a² = b² + c² forumulas to calculate length, x from y, y from x etc. Everything on the web talks about finding the distance between two points, but I allready know how to do that, i want to find a point, given a distance! Many thanks, Chris
__________________ Chris |
| | |
| | (permalink) | |
| Moderator | Chris, That is a lot of work to do by yourself. If you want to go that route join an open source project to do the same. There should be a few out there. You may want to look at the gEDA project. Quote:
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | |
| | |
| | (permalink) |
| Experienced Member | This file arcline.txt is an OLD Old old program I wrote for GWBASIC or BASICA. It plots an arc across 3 points on the screen. It may plot smooth contours from points 2,3&4 then points 3,4,5 averaging the first part of an arc with the last part of the previous arc. Are you confused yet? Anyway, what you want is in there. You just have to find it. If you have GWBASIC or BASICA, you can load it as a txt file and run it and see how it works. If you modify it, save it as a BAS file. If you don’t have GWBASIC or BASICA, you can get it online and full manual or I can ZIP them for you.
__________________ C:\WHUT ? Beware the asterisk * Last edited by ClydeCrashKop; 22nd March 2008 at 03:02 PM. |
| | |
| | (permalink) |
| Experienced Member | WITH NUM LOCK ON MOVE PIXEL WITH 1 - 9. 5 LETS YOU ENTER A POINT 1,2,3 OR 4 IF YOU ENTER 4,IT PLOTS ARC USING THE LAST TWO POINTS AS 1 & 2 I was wrong, it doesn’t plot an average, just more arcs. This is a better copy because the input prompt was confusing. In GWBASIC, CTRL > Break stops the program and SYSTEM, Enter gets you back to Windows. It may run in Q-BASIC as well.
__________________ C:\WHUT ? Beware the asterisk * |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Your new point would simply be: Xnew = Xorig + dist*sin(angle) Ynew = Yorig + dist*cos(angle) | |
| | |
| | (permalink) | |
| Experienced Member | Quote:
I have a gradient (y=Mx+c). How would i go about turning M into degrees? Many thanks.
__________________ Chris | |
| | |
| | (permalink) | |
| Experienced Member | Quote:
The tangent of an angle is calulated by dividing the rise by the run so if you take the inverse tangent of your slope, you will get the angle: tan-1(M) = angle. For instance, if your line is defined as y=x+4, your slope is "1" and the tan-1(1)= 45° Make sure you know if your code is working in degrees or radians. If need be you can convert between them. Last edited by phalanx; 27th March 2008 at 10:20 PM. | |
| | |
| | (permalink) | |
| Experienced Member | Quote:
__________________ Chris | |
| | |
| | (permalink) |
| Experienced Member | Converting TAN to angle in order to get SIN and COS is not the best way to do it because you need more calculation and will get higher error. This is better SIN=SQRT(1/(1+1/M^2)) COS=SQRT(1/(1+M^2)) |
| | |
| | (permalink) |
| Experienced Member | Sick of Eagle ? I can see why Petr |
| | |
| | (permalink) | ||
| Experienced Member | Quote:
Quote:
I seem to be a very single minded induvidual. I can only seem to be interested in one thing at any one time. Then ill start doing something else, and that something else is a replacement for eagle. Ill probably get sidetracked in about a month or two though! I think ive tried just about all of the bad bunch of packages. I have heard good things about orcad (my uni uses it, for example) but its not for me. I cant even remember all the reasons why i didnt like it, but i think one of the reasons was that it consists of about 10 seperate programs, and another was the slightly dated feel of the UI. I think that this separate program idea is shite, and is probably a throw back to days gone by. Here are my biggest problems with eagle: Visual artefacts pollute the screen a lot of the time, requiring user to zoom in/out to remove them. It would appear that the makers of Eagle, never fully understood Win32API Invalidate method! The stupid wrench tool. Why group so many options under one roof? The component search dialog, which is horrendous. Not enough autonomy. My program will make naming nets, etc easier, and will (hopefully) bring many new innovations to the humble schem capture and pcb editor package market. Ive decided not to join an open source project myself, as I have a very clear idea of what I want from my program, not to mention that the encapsulated components that Im creating will come in handy as the building blocks for many future projects. So far, i have completed a large chunk of the vector graphics class that is at the heart of the pcb and schem capture. Now Im finally free to start on the meat of the application. the electronic specific parts. Depending on the quality, and stability of the application (which is quite good so far!) and also If i receive enough interest, I may sell the program at a very reasonable price (something aimed at the hobbyist). My original thoughts were to create a freeware package, but that’s gone out the window, now that I’ve realised how much work (not to mention time) is needed to complete the project to a professional standard. When my project is nearing a more completed state, I will purchase some web space, and distribute a beta test
__________________ Chris Last edited by HerbertMunch; 14th April 2008 at 03:16 PM. | ||
| | |
| | (permalink) |
| Experienced Member | Yes this lack of auto-redraw is really stupid (even a simple double-buffering algorithm would fix that) but you do not need to zoom in and out, just press F2 Petr |
| | |
| | (permalink) |
| Experienced Member | hopefully i wont have to use eagle ever again!
__________________ Chris |
| | |
| | (permalink) |
| Experienced Member | Also another thing about eagle; it seems to "forget" about some connections when creating pcb air wires. I have created entire boards and relied on eagle to connect air wires to everything that should be connected, and only when id etched and started to solder did i realise that some things werent connected. I need something a bit more reliable. And whats the point of the schem capture if it doesnt allways translate properly into airwires?
__________________ Chris |
| | |
| | (permalink) | ||
| Experienced Member | Quote:
Quote:
Sorry to come so late. I read the original post and then didn't follow the thread. I hope these suggestions help. BTW, I did not like the EAGLE beta. There were some minor improvements, but I found many of the changes a disadvantage. I particularly didn't like the new select feature. John. | ||
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Distance measurement project | bigfarmerdave | Electronic Projects Design/Ideas/Reviews | 13 | 14th December 2007 06:42 PM |
| Using Oscilloscopes | mechie | Electronic Theory | 9 | 29th November 2007 09:48 PM |
| Looks simple enough. But..... | hjl4 | Micro Controllers | 3 | 29th January 2007 11:17 AM |
| SIMPLE ADC PROBLEM | neelam29 | Micro Controllers | 2 | 9th March 2006 08:46 AM |
| ya | mari_69 | Micro Controllers | 4 | 7th June 2004 01:29 PM |