POV-Ray : Newsgroups : povray.advanced-users : Tricky object alignment problem : Re: Tricky object alignment problem Server Time
28 Jul 2024 10:17:33 EDT (-0400)
  Re: Tricky object alignment problem  
From: Tor Olav Kristensen
Date: 27 May 2006 07:18:50
Message: <4478359a$1@news.povray.org>
Orchid XP v2 wrote:
> OK, have a look at this:
> 
> #macro Rectangle(A, B, C, D, r)
>   sphere {A, r}
>   sphere {B, r}
>   sphere {C, r}
>   sphere {D, r}
>   cylinder {A, B, r}
>   cylinder {B, C, r}
>   cylinder {C, D, r}
>   cylinder {D, A, r}
> #end
> 
> As you can see, this draws a wireframe rectangle between 4 
> user-specified points in space.
> 
> Assuming that all 4 points are actually co-plannar, what would the *the 
> simplest* way to fit a box{} object into the middle of the thing?

Use Matrix_Trans() or Shear_Trans()
(These are macros in transforms.inc)

This may also be relevant:

"How to transform a triangle into another", 2. October 2002
http://news.povray.org/povray.text.tutorials/thread/%3C3D9B843D.E5392CD0@hotmail.com%3E
http://tinyurl.com/nwvck

-- 
Tor Olav
http://subcube.com


Post a reply to this message

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