Re: A Z80 guy needs help!
Posted by
mariss92705
on 2002-01-20 15:03:39 UTC
What I wrote about rounding errors had an error itself.
Vx = (D + delta D) * sin (theta) - X position
Vy = (D + delta D) * cos (theta) - Y position
Replace X with X + Vx; (this is now the new X position)
Replace Y with Y + Vy; (this is now the new Y position)
Replace D with D + delta D; (this is now the new vector lenght)
"Delta D" is the distance moved along the vector in 1/1,024 sec.
"Delta D" varies with acceleration.
"theta" is the angle of the vector, and stays constant.
Mariss
> Vx = (D + delta) * sin(theta) - D * sin(theta)That is wrong. It should have been:
> Vy = (D + delta) * cos(theta) - D * cos(theta)
>
> Again, replace D with D + delta for the next time increment.
Vx = (D + delta D) * sin (theta) - X position
Vy = (D + delta D) * cos (theta) - Y position
Replace X with X + Vx; (this is now the new X position)
Replace Y with Y + Vy; (this is now the new Y position)
Replace D with D + delta D; (this is now the new vector lenght)
"Delta D" is the distance moved along the vector in 1/1,024 sec.
"Delta D" varies with acceleration.
"theta" is the angle of the vector, and stays constant.
Mariss
Discussion Thread
mariss92705
2002-01-19 21:39:25 UTC
A Z80 guy needs help!
mariss92705
2002-01-19 21:44:04 UTC
Re: A Z80 guy needs help!
Russell Shaw
2002-01-19 23:22:05 UTC
Re: [CAD_CAM_EDM_DRO] A Z80 guy needs help!
Carol & Jerry Jankura
2002-01-20 06:28:52 UTC
RE: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
mariss92705
2002-01-20 09:25:22 UTC
Re: A Z80 guy needs help!
ccs@m...
2002-01-20 09:43:19 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
Bill Vance
2002-01-20 12:37:01 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
Bill Vance
2002-01-20 12:51:14 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
ccs@m...
2002-01-20 13:12:42 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
mariss92705
2002-01-20 13:40:56 UTC
Re: A Z80 guy needs help!
mariss92705
2002-01-20 15:03:39 UTC
Re: A Z80 guy needs help!
Alexandre GuimarĂ£es
2002-01-20 15:28:31 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
Alan Marconett KM6VV
2002-01-20 15:30:12 UTC
Re: A Z80 guy needs help!
Russell Shaw
2002-01-20 15:36:10 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!
mariss92705
2002-01-20 15:50:10 UTC
Re: A Z80 guy needs help!
Alan Marconett KM6VV
2002-01-21 10:48:42 UTC
Re: A Z80 guy needs help!
Jon Elson
2002-01-21 22:50:21 UTC
Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!