POV-Ray : Newsgroups : povray.newusers : Aligning objects : Re: Aligning objects Server Time
31 Jul 2024 00:25:46 EDT (-0400)
  Re: Aligning objects  
From: JC (Exether)
Date: 3 Jun 2003 02:47:33
Message: <3EDC4483.4090709@spam.fr>
What exactly do you want to connect, is it the individual faces of a 
RhombicDodecahedron or several RhombicDodecahedrons ilnked by the faces ?

Anyway, more genraly, you can use vrotate as suggested (trace seems to 
me unadequate here, because it is a geometric problem and hence it has 
an exact solution), but I think it is a bit complicated. You can 
probably as Ib Rasmussen said figure out a initial position and a simple 
set of transformations that will put your objects into connection.

The reason why you can't figure it out yet is probably that there is no 
trivial way to get the initial position, you will need to calculate some 
trigonometrics formulae either to get some angles or the length of the 
sides or something like that.

I hope that helps,
If I can figure what you want I might try it,

JC


Stephen in Calgary wrote:
> 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.