POV-Ray : Newsgroups : povray.newusers : placing objects by their coordinates Server Time
4 Nov 2024 23:16:56 EST (-0500)
  placing objects by their coordinates (Message 1 to 10 of 10)  
From: Wade
Subject: placing objects by their coordinates
Date: 14 Sep 2001 10:33:27
Message: <3ba21537$1@news.povray.org>
How can I learn placing objects by their coordinates?

Wade


Post a reply to this message

From: Trevor Quayle
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 10:40:09
Message: <3ba216c9$1@news.povray.org>
"Wade" <Zav### [at] aolcom> wrote in message
news:3ba21537$1@news.povray.org...
> How can I learn placing objects by their coordinates?
>
> Wade
>
>

I'm not sure what you mean.

-tgq


--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}//   TGQ


Post a reply to this message

From: Ken
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 10:45:16
Message: <3BA218FB.EFDF2557@pacbell.net>
Wade wrote:
> 
> How can I learn placing objects by their coordinates?

I am not sure that it can easily be explained without directly quoting
from the POV-Ray documentation. I also suggest you check out the tutorials
section of the links page at povray.org. There are several beginners
tutorials listed there that deal with coordinate systems and object placement.

-- 
Ken Tyler


Post a reply to this message

From: Wade
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 10:54:14
Message: <3ba21a16@news.povray.org>
Trevor:
I'm not sure what you mean.

Lately, I've seen people placing objects in their precise positions without
translating from 0 like the widow.

Wade


Post a reply to this message

From: Steve
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 10:57:24
Message: <slrn9q46jn.938.steve@zero-pps.localdomain>
On Fri, 14 Sep 2001 09:44:36 -0500, Wade wrote:
>How can I learn placing objects by their coordinates?

Havn't you already been doing that in the scene you're 
working on?

The best I can say is read the POV documentation, the 
tutorial at the beginning will answer all these sorts 
of questions.  Also look at the source files that come
with POV, and those of other people.   

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  3:52pm  up 3 days, 18:06,  1 user,  load average: 1.00, 1.00, 1.00


Post a reply to this message

From: Wade
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 11:10:13
Message: <3ba21dd5@news.povray.org>
Steve wrote:

Havn't you already been doing that in the scene you're
working on?


All scenes and tutorials that I have seen People place objects on 0 or near
at 0 then translating them to their final placement.

Wade


Post a reply to this message

From: Tom Melly
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 11:34:53
Message: <3ba2239d$1@news.povray.org>
"Wade" <Zav### [at] aolcom> wrote in message news:3ba21537$1@news.povray.org...
> How can I learn placing objects by their coordinates?
>

Same way you get to Carnegie Hall... ;)

That aside, a trap for beginners is not to understand why translating then
scaling produces such different results to scaling then translating.

for example:

sphere{0,1 scale 2 translate x*2 pigment{rgb <1,0,0>} // centre of sphere is at
x=2
sphere{0,1 translate x*2 scale 2 pigment{rgb <0,1,0>} // centre of sphere is at
x=4

My general rule is "open the door", aka scale, rotate, translate or "grasp the
handle, turn it and open the door". There are many times to break this rule, but
you will know when they are...

Also, creating unions of related objects and then translating the union can
avoid much arsing about (technical term).


Post a reply to this message

From: Trevor Quayle
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 11:57:34
Message: <3ba228ee$1@news.povray.org>
You need to have a real understanding of 3 dimensional space and coordinates
and know exactly where everything is in your scene.

It is often a lot easier to create an object at the origin and then traslate
and rotate it to it's final position. For example, if you wanted to place a
chair in the corner of your room, it would be very difficult to figure out
it's geometry in relation to it's absolute position, if you wanted the chair
rotated 20 degrees, it would be near impossible.  You would, instead create
your chair at the origin.  Now you know it's actual size and position at the
origin, you can do your 20 degree rotation and then translate it to it's
final position in the scene.  Now you decide you don't want it in that
corner, you want it it a different one, it's just a matter of changing the
translation of the chair.  If you had created in it's final position, you'd
have to change the entire geometry of the chair to suit.

let's look at your back wall with window:

you can create it like this
// Back Wall
difference{
  box{<-10,0,-12>,<10,10,-13>}
  box{<-4,2,-11><9,6,-14>}
  texture{Wall_Texture}}
}

but you can also achieve the same results doing this:

difference{
    box{<0,0,0> <20,10,-1>}
// wall is 20 units wide, 10 high and 1 thick
    box{<0,0,1> <4,4,-2> translate<8,2,0>}
// window is 4 units by 4 units (notice it exeeds the thickness of the wall
in the z-axis)
// it is then translated right 8 units and up 2 units
    translate<-10,0,-12>
// the whole wall with the cutout is now moved to it's final position in the
scene
}
// you now know that you have a wall 20w x 10h x 1t with a 4x4 window with
its bottom 2 units
// up and it's left 8 units from the left hand end of the wall and that the
bottom left corner of the
// wall is 10 units to the right and 12 units back

you can now create a window pane and trim for the window, and you know the
exact size of the window opening and where it is located


-tgq



--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}//   TGQ


Post a reply to this message

From: Simon
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 15:11:41
Message: <3ba2566d@news.povray.org>
> How can I learn placing objects by their coordinates?
>

Perhaps it would be easier for you to use meters and not pov units.
You could do something like this:

#declare m=3;               //3 pov units =1 meter
#declare cm=m/100;
#declare km=m*1000;

Then you could use this to place you objects
for example:

box{
    <-35*cm,2*m,0.2*km>
    <50*cm,0,0>}


Post a reply to this message

From: Steve
Subject: Re: placing objects by their coordinates
Date: 14 Sep 2001 15:25:25
Message: <slrn9q4lf5.9iv.steve@zero-pps.localdomain>
On Fri, 14 Sep 2001 10:21:19 -0500, Wade wrote:

>All scenes and tutorials that I have seen People place objects on 0 or near
>at 0 then translating them to their final placement.

You've just answered your own question here, so you do understand:-)  

Maybe you're just thinking it's a bit more complicated than it actually
is. 

Be sure to read the comments all the others have written in this
thread, and if you don't understand something ask questions and 
read relevant sections of the documentation.

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  8:05pm  up 3 days, 22:19,  1 user,  load average: 1.00, 1.02, 1.01


Post a reply to this message

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