MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

help with trig(?) calculation

  • To: mathgroup at
  • Subject: [mg13155] help with trig(?) calculation
  • From: Leon.Bryant at (Leon Bryant)
  • Date: Mon, 13 Jul 1998 07:42:06 -0400
  • Organization: The Math Forum
  • Sender: owner-wri-mathgroup at

i need some help from the "gurus". i am a multimedia programmer working
in San Antonio, and need help with a programming idea that involves
some simple(?) trig.

the problem:

i have a display area (computer screen) that has the dimensions 640 by
480 units (pixels).
my program sets the dimensions of this rectangle to:

TL - 0,0
TR - 640,0
BL - 0,480
BR - 640,480

what i would like to do is give the coordinates of a point on the
screen, an angle (or a second point), and devise an algorithm that will
plot where the imaginary line would inintersect the boundaries of the
display area. 
for instance:

point:  (320,240) (centered on screen) angle: 45 degrees
intersection point: (640,0)

this one's intuitive since the starting point is centered on the screen,
and the angle is 25% of 360 degrees, but i'm stumped with anything more

can you explain how i'd do this? can it be put into a simple formual?

email: leon.bryant at

  • Prev by Date: Editable Images of the Globe?
  • Next by Date: Re: Integrate Bug?
  • Previous by thread: Re: Editable Images of the Globe?
  • Next by thread: Re: help with trig(?) calculation