POV-Ray : Newsgroups : povray.general : Help with parabola Server Time
16 Nov 2024 11:17:39 EST (-0500)
  Help with parabola (Message 1 to 3 of 3)  
From: mick
Subject: Help with parabola
Date: 5 Sep 1998 09:08:21
Message: <01bdd8c5$e09ec3a0$b144a8c2@wphnvffu>
Help!

I have drawn a parabolic shape using the formula y = X^2

The parabola is composed of spheres scaled into ellipses with the longside
in the y direction

I have been trying to rotate each ellipse so the the length is pointing in
the direction of the parabola

I need to calculate the gradient at each point. I'm no mathmatician so
Please help


Post a reply to this message

From: Simon de Vet
Subject: Re: Help with parabola
Date: 5 Sep 1998 14:07:18
Message: <359FC109.B707411B@istar.ca>
mick wrote:

> Help!
>
> I have drawn a parabolic shape using the formula y = X^2
>
> The parabola is composed of spheres scaled into ellipses with the longside
> in the y direction
>
> I have been trying to rotate each ellipse so the the length is pointing in
> the direction of the parabola
>
> I need to calculate the gradient at each point. I'm no mathmatician so
> Please help

Calculus. Now I've been out of calc for all summer, but I remember the basics.

The slope of a line is determined by it's first derivative. Therefore, if
y=x^2, then the slope at any given point = 2x.

ie: The slope a y=-10 is -20 (ie: down 20 units for every unit to the right)
at y=1 the slope is 2, and at y=0 the slope is 0 (ie: flat)

Am I wrong? I feel this is right...

It's been too long....

Simon
http://home.istar.ca/~sdevet


Post a reply to this message

From: Nathan Kopp
Subject: Re: Help with parabola
Date: 5 Sep 1998 14:25:13
Message: <35F1731F.7B289DDF@ltu.edu>
The slope (i.e. derivative, gradient) of a parabola at any point is
dy
-- = 2x
dx

For example, the slope at x=1 is 2*1=2, while the slope at x=2 is 2*2=4.

To find the angle that you need to rotate, plug the slope into the inverse
tangent function (which is called "atan2" in POV-Ray).

-Nathan

mick wrote:
> 
> Help!
> 
> I have drawn a parabolic shape using the formula y = X^2
> 
> The parabola is composed of spheres scaled into ellipses with the longside
> in the y direction
> 
> I have been trying to rotate each ellipse so the the length is pointing in
> the direction of the parabola
> 
> I need to calculate the gradient at each point. I'm no mathmatician so
> Please help


Post a reply to this message

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