POV-Ray : Newsgroups : povray.general : re parabola problem Server Time
5 Nov 2024 15:55:43 EST (-0500)
  re parabola problem (Message 1 to 4 of 4)  
From: mick
Subject: re parabola problem
Date: 6 Sep 1998 04:58:14
Message: <01bdd96c$13d58e60$de78a8c2@wphnvffu>
Thanks to everyone for their help

After much messing about this is as close as I can get

Is it possible to get more accuracy, am I doing this wrong

Thanks 

Mick Hazelgrove

heres the code:-



// ----------------------------------------

camera{
location  <0.0, 0.5, -60.0>
look_at   <0.0, 0.0,  0.0>
}

background {Blue}

light_source{<-30, 30, -30> color rgb<1,1,1>}

//------------------------------------------

#declare Jet = union{
 #declare Count = -40
 #declare Size = 0.3
#declare Angle = 0

 #while( Count < 40 )
 #declare RS1 = seed(Count)
 #declare  Angle = degrees(pow(Count,2)/75)/(Count/3) //This works ish

       blob{
            threshold 0.6
               sphere{0,Size,1 scale <3,1,1>  
                     rotate z* Angle 
                           translate<Count/3,pow(Count,2)/75,0>}
                                 pigment{color rgbf<0.5,1,0.75,0.95>}
                                        finish{specular 1}
                                               normal{bumps scale 0.1}
              }

//degrees(atan2(pow(Count,2)/75,Count/3)) //this works ish
#declare Count = Count + 1
#end
}

//-------------------------------------------------------------
object{Jet
scale 2
translate <0,-15,0>
}


Post a reply to this message

From: Johannes Hubert
Subject: Re: IMP membership???
Date: 6 Sep 1998 06:20:34
Message: <35f253e2.0@news.povray.org>
Hi Mick!

This if off-topic!

Some time ago you sent me an e-mail about joining the IMP.
The reason that I did not respond was not that I was not interested or that
I don't want to have you in the project, but because all messages I sent to
your e-mail address (the same you are using as the reply-to address for your
post here) BOUNCED!
I couldn't get trough!

If you are still interested, contact me again - maybe with checking out your
address first?

Bye,
Johannes -:- IMP Coordinator

P.S.
I send a CC of this to your address too, to see if it works now...


Post a reply to this message

From: Johannes Hubert
Subject: Re: IMP membership???
Date: 6 Sep 1998 06:42:50
Message: <35f2591a.0@news.povray.org>
Johannes Hubert wrote in message <35f253e2.0@news.povray.org>...
>
>P.S.
>I send a CC of this to your address too, to see if it works now...


Just to tell you: It didn't. It bounced again with:

"Host minda.softnet.co.uk not found"

Bye,
Johannes.


Post a reply to this message

From: Nathan Kopp
Subject: Re: re parabola problem
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.