POV-Ray : Newsgroups : povray.general : re parabola problem : Re: re parabola problem Server Time
16 Nov 2024 09:21:47 EST (-0500)
  Re: re parabola problem  
From: Nathan Kopp
Date: 6 Sep 1998 20:39:36
Message: <35F31C5B.79194CB8@ltu.edu>
Mick

Here's what you want:

 #declare slope=1/75*3*2*Count
 #declare Angle = degrees(atan2(slope,1))

I just tested this and it works.  Your parabola equation is:

y = 1/75 * x^2

Therefore, the slope is 1/75*2*x.  The 3 is to convert from Count to x (since
x=Count/3 from your 'translate' statement).

-Nathan

BTW, I also get bounced mail messages when I send to you.  Here's the message
that I wanted to send to you:
---------------------------------
The tangent of an acute angle in a right triangle is defined as the ratio
of the opposite side of the triangle over the adjacent.  This means that
an the tangent of an angle centered on the origin is equal to the slope.

      |    /
      |   / |
      |  /  |
      | /   | dy
      |/ a  |
------+--------
      |  dx
      |

The tangent of angle a is equal to dy/dx (which equals the slope).
Therefore, the inverse tangent of the slope will give you the
angle.  You'll need to use:

#declare angle = degrees(atan2(slope, 1))

This takes the inverse tangent of slope and converts radians to
degrees.

I hope this helps.  :)

-Nathan


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.