POV-Ray : Newsgroups : povray.binaries.images : Stupid math error : Re: Stupid math error Server Time
16 Aug 2024 02:30:36 EDT (-0400)
  Re: Stupid math error  
From: Robert Chaffe
Date: 1 Apr 2002 23:59:34
Message: <3ca93ab6$1@news.povray.org>
"Xplo Eristotle" <inq### [at] unforgettablecom> wrote in message
news:3CA92AB5.8DAC1279@unforgettable.com...
> Okay, this is driving me nuts. I have a bunch of 4 x .5 x 1 boxes which
> are stacked corner to corner in a stair pattern. Given their layout, I
> thought/assumed that they make a 30 degree angle with the ground (a
> plane), but when I added another box on the side and rotated it up 30
> degrees, it didn't line up with the blocks!
>
> I'm stumped. Barring some kind of bug, I can't imagine why I'm having
> this problem; the math isn't particularly complicated here. Can anyone
> help me with this? Code and example image follow:
>
> #declare stair_row = union
> {
> #declare stair_row_members = 1;
> #declare stair_row_count = 0;
> #while (stair_row_count < stair_row_members)
> box { <0, 0, 0> <4, .5, 1> }
> #declare stair_row_count = stair_row_count + 1;
> #end
> }
>
> #declare stair_block = union
> {
> #declare stair_rows = 10;
> #declare stair_row_count = 0;
> #while (stair_row_count < stair_rows)
> object { stair_row translate <0, stair_row_count/2, stair_row_count> }
> #declare stair_row_count = stair_row_count + 1;
> #end
> }
>
> #declare stair_rail = union
> {
> box { <0, -in, 0> <in*1, 0, 15> rotate <-30, 0, 0> }
> }
>
> I'm using MacMegaPOV 0.7 (I don't care for the present interface of the
> official beta) on Mac OS 8.6, if anyone cares.
>
> -Xplo

Perhaps because the tangent of 30 degrees is about 0.577350269, not 0.5 ?

Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

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