Results 1 to 5 of 5

Thread: From Point directly to another Point

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    From Point directly to another Point

    Hi,

    I want to know how to get from some point to another within a direct motion? not with x=x+1 and y=y+1
    NOT like this:
    Code:
    *\
       \
        \______*
    If any questions,
    write.

    Thank you,
    Arie.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    V=v*(A-B)/|A-B|
    V is the speed vector, v is speed scalar, A and B are the points (vectors)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    A means "from" point?
    B means "to" point?

    Do you have a tutorial, or a sample project for this?

    Thank you,
    Arie.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    from A to B yes.
    You could implement this calculating A-B, call it C, and have Cl as length:
    Cx=Ax-Bx
    Cy=Ay-By
    Cl=sqr(Cx*Cx+Cy*Cy)
    Vx=v*Cx/Cl
    Vy=v*Cy/Cl
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    Do you have a sample project for that?
    I'll understand it more from an example...

    Thank you, if yes,
    Arie.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width