|
![](/i/fill.gif) |
Le 13/03/2010 22:05, Kene nous fit lire :
> I am working on a math problem with POV-Ray where I am trying to calculate the
> slope of a line. I have located two points on the line with the coordinates
> (9000, -8022) and (-5000, -1792). Let us assume the first set of coordinates are
> identified as Ref1_Pos.x, Ref1_Pos.z while the second set are Ref2_Pos.x and
> Ref2_Pos.z. The slope formula will be:
>
> Slope = ( Ref1_Pos.z - Ref2_Pos.z )/( Ref1_Pos.x - Ref2_Pos.x )
>
> In manual calculation the above problem gives the result: -0.304862
> With POV-Ray I get: -0
Maybe we can see actual code ?
#declare Ref1_Pos=<9000,-8022>;
For instance, you get a .x and a .y (and .z=0)
Post a reply to this message
|
![](/i/fill.gif) |