To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 17244
  some 'puter/math help please
 
here's the scenario as best I can describe-- x and y co-ordinates line segment starts at (0,0), goes out to whatever--let's say (10,15) I want to make a dot follow the line segment from (10,15) down to (0,0) So the dot startes at (10,15), then moves (...) (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
(...) The points on the line take the form y = mx + b, where b is the intercept with the y-axis and m is the slope. For the problem as you describe it, b is 0 since the line crosses the y-axis at zero, and m = 1.5 or 15/10 since the slope is the (...) (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
In lugnet.org.ca.rtltoronto, Rafe Donahue wrote: <snip> (...) actually, that helps quite a bit! I thought I'd have to get pythagoras in the equatinos somehow, but htis is much easier! Much appreciated! (...) It'll be a wide range of starting points, (...) (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
In lugnet.org.ca.rtltoronto, Rafe Donahue wrote: <snip> (...) I guess this is where pythagoras will factor in--I want the number of points to be the same as the length of the initial line (from random (x,y) to (0,0))--if the line is 17 units long, (...) (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
(...) You mean like this? (URL) have that packaged up in a MyBlock, and other than rounding errors it works nice and fairly quickly. (...) Not exactly; it really depends on the precision you want/need. (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
(...) I love stuff like that :) Thanks Dave (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
(...) I think that's all I need for the 'precision' I want Thanks I'l ltry when I get home tonite (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
David, Check out Bresenham's Algorithm for line drawing: (URL) It's been around forever and does not require complex math - which was not available on older computers anyways. Sometimes the old guys knew how to do stuff right. Ralph (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)
 
  Re: some 'puter/math help please
 
(...) ALl this so you can become the most proficient NXT game deceloper in the word? :) Dave, the world dose NOT need another snake game. :) how about - ummmmm NXT connect 4, or.. um.... nxt project X naw... :) Chris (18 years ago, 23-Mar-07, to lugnet.org.ca.rtltoronto)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR