POV-Ray : Newsgroups : povray.newusers : Aligning objects : Re: Aligning objects Server Time
31 Jul 2024 00:27:17 EDT (-0400)
  Re: Aligning objects  
From: Stephen in Calgary
Date: 2 Jun 2003 00:47:00
Message: <3edad6c4$1@news.povray.org>
Hi
Thanks for the feedback so far. I had looked up the suggested functions
(trace, vrotate) but hadn't yet had the opportunity to figure out if they'd
be the best tools to use.  If that's all you can suggest, then I'll
eventually get this to work for me.

What I'm trying to build is the surfaces of a rhombic dodecahedron, but more
than just the 3-D object comprised of 12 surfaces: - assume each side is
made from a piece of wood and thereby is a 3-D object in it's own right and
therefore each side is rotated and translated from the declared object at
the origin and must be aligned next to another side(s).

If you have any further hints, I'd appreciate it.

shapes.inc defines a [regular] dodecahedron as follows, this one has 12
sides made of pentagons; "mine" is 12 sided of course, but is 12 rhombi
which I defined as following next.

#declare Dodecahedron =
 intersection
  {plane {-z, 1 rotate <-26.56505117708,    0, 0>}
   plane {-z, 1 rotate <-26.56505117708,  -72, 0>}
   plane {-z, 1 rotate <-26.56505117708, -144, 0>}
   plane {-z, 1 rotate <-26.56505117708, -216, 0>}
   plane {-z, 1 rotate <-26.56505117708, -288, 0>}

   plane {-z, 1 rotate <26.56505117708,  -36, 0>}
   plane {-z, 1 rotate <26.56505117708, -108, 0>}
   plane {-z, 1 rotate <26.56505117708, -180, 0>}
   plane {-z, 1 rotate <26.56505117708, -252, 0>}
   plane {-z, 1 rotate <26.56505117708, -324, 0>}

   plane { y, 1}
   plane {-y, 1}
   bounded_by {sphere {0, 1.2585}}
  }


#declare RhombicDodecahedron =
intersection
  {
 plane { z, 1 rotate <  0,  45,  45>}
 plane { z, 1 rotate <  0,  45, -45>}
 plane { z, 1 rotate <  0, -45,  45>}
 plane { z, 1 rotate <  0, -45, -45>}

 plane {-z, 1 rotate <  0,  45,  45>}
 plane {-z, 1 rotate <  0,  45, -45>}
 plane {-z, 1 rotate <  0, -45,  45>}
 plane {-z, 1 rotate <  0, -45, -45>}

 plane {-x, 1 }
 plane { x, 1 }

 plane { y, 1}
 plane {-y, 1}
  }




"Stephen in Calgary" <signup-without-spam-@shaw.ca> wrote in message
news:3ed9a997$1@news.povray.org...
> I have been working with PovRay for a bit now and have come to a point
where
> I may be spinning my wheels because I hope there is a easy way to
accomplish
> the following that I cannot figure out for myself.
>
> I have an 3D object where the sides are angled to each other and then it
is
> rotated on a couple of axes. Right next to it, I want to place another
> similar object, like bricks stacked in a crooked or non-linear wall. I
can't
> figure out the coordinates or normal of the side of the first object so I
> can place the second object immediately ajacent.
>
> Please tell me there are some simple routines to provide this alignment.
>
> Thanks in advance
>
>


Post a reply to this message

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