|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
As a newcomer to raytracing and Povray, I am starting with simple objects. I
have an ultimate goal to recreate my office, but right now I am focusing on
recreating my desk.
I am wondering what is the best way to go about setting sizes of objects,
etc...
Should I do this: (where the box is 12 feet wide, .5 foot high, 6 feet deep)
box {
<-6, -.25, -3>,
<6, .25, 3>
texture ....
}
or something like (where surface is 36 inches deep, 1 inch high, 72 inches
long)
#declare foot = 3;
#declare inch = foot / 12;
#local Surface_Depth = 36*inch;
#local Surface_Height = 1*inch;
#local Surface_Length = 72*inch;
#local Surface = box {
<-(Surface_Length / 2), -(Surface_Height/2), -(Surface_Depth/2)>,
<(Surface_Length / 2), (Surface_Height/2), (Surface_Depth/2)>
texture ...
}
Basically, I am trying to standardize the way I recreate life like
objects -- at least square ones.... should I bother with this, or should I
go about just "guessing" at where they go... for example, I am currently
battling with trying to position the drawers beneath my desk properly....
the "bothersome" code is as follows, to correctly position the drawers (+
the frame around the drawers)
//Drawer Frames
object {Drawer_Frame translate
<-(Surface_Length/2)+(Left_Drawers_Left_Surface_Distance)+(Drawer_Frame_Leng
th/2), -(Surface_Height/2 + Drawer_Frame_Height/2), -(Surface_Depth/2 -
Left_Drawers_Front_Surface_Distance)+(Drawer_Frame_Depth/2)>}
//Drawers
object {Left_Drawers translate
< -(Surface_Length/2)+(Left_Drawers_Left_Surface_Distance)+(Drawer_Frame_Len
gth/2) + (Drawer_Frame_Inside_Length/2 -
Drawer_MainShape_Length/2) -.0035, -(Surface_Height/2 +
Drawer_Frame_Height/2), -(Surface_Depth/2 -
Left_Drawers_Front_Surface_Distance)+(Drawer_Frame_Inside_Depth/2) - .045>}
And it still dosent work correctly yet... I had to add in .0035 just to get
the drawers aligned properly (probably due to measurement inaccuracy)....
Any suggestions?
Thanks
(From a newbie!)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3c7bd78d$1@news.povray.org> , "Lieut_Data"
<lIe### [at] yahOOcom> wrote:
> Should I do this: (where the box is 12 feet wide, .5 foot high, 6 feet deep)
As a serious advice: Go with the metric system and simply take one unit as a
meter. It makes everything so much easier when modeling as it perfectly fits
the decimal system using in POV-Ray...
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3c7be84b@news.povray.org...
> In article <3c7bd78d$1@news.povray.org> , "Lieut_Data"
> <lIe### [at] yahOOcom> wrote:
>
> > Should I do this: (where the box is 12 feet wide, .5 foot high, 6 feet
deep)
>
> As a serious advice: Go with the metric system and simply take one unit
as a
> meter. It makes everything so much easier when modeling as it perfectly
fits
> the decimal system using in POV-Ray...
>
> Thorsten
Thankyou for the advice....
One other thing... I am trying to correctly position items based on other
items position, but I am running into a pitfall... I need the center of my
drawers to be at the center of my frame. Is there a way to access the
"center" of an object, i.e.
#declare my_box = box {...}
translate {<my_box.x, my_box.y, my_box.z>}
I dont think this is possible, as not all objects have a center (am I
right?) and Povray only moves the whole item so many places when
translating, and does not reposition the center... but it would be nice...
Right now I do the following for square items
x: positioning
(desk_frame_length / 2) + (desk_drawer_length / 2)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Lieut_Data wrote:
>
> [...]
>
> One other thing... I am trying to correctly position items based on other
> items position, but I am running into a pitfall... I need the center of my
> drawers to be at the center of my frame. Is there a way to access the
> "center" of an object, i.e.
In Povray 3.5 there is a 'Center_Trans()' macro (in transforms.inc) which
tries to achieve this using min_extend and max_extend, but this is not
perfect of course.
When you design the objects it should not be that difficult to know where
the center is.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3c7bec2d@news.povray.org>,
"Lieut_Data" <lIe### [at] yahOOcom> wrote:
> #declare my_box = box {...}
>
> translate {<my_box.x, my_box.y, my_box.z>}
>
> I dont think this is possible, as not all objects have a center (am I
> right?) and Povray only moves the whole item so many places when
> translating, and does not reposition the center... but it would be nice...
Right. Not all objects have a single point that can be defined as the
"center", the definition is different for every object, and is often
useless for most purposes. A common technique is to create shapes around
the origin (point < 0, 0, 0>) and move them to where you want them, this
makes it easier to track where the object as a whole is. Really, you
care more about the surfaces and size of the object than a point
somewhere in it's middle.
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > I dont think this is possible, as not all objects have a center (am I
> > right?) and Povray only moves the whole item so many places when
> > translating, and does not reposition the center... but it would be
nice...
>
> Right. Not all objects have a single point that can be defined as the
> "center", the definition is different for every object, and is often
> useless for most purposes. A common technique is to create shapes around
> the origin (point < 0, 0, 0>) and move them to where you want them, this
> makes it easier to track where the object as a whole is. Really, you
> care more about the surfaces and size of the object than a point
> somewhere in it's middle.
Yes, I just realized this -- I had accidentally created an object,
transformed it, then wanted to transform it again... I fixed the problem
with a single transform :-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Lieut_Data wrote in message <3c7bd78d$1@news.povray.org>...
>As a newcomer to raytracing and Povray, I am starting with simple objects.
I
>have an ultimate goal to recreate my office, but right now I am focusing on
>recreating my desk.
>
>I am wondering what is the best way to go about setting sizes of objects,
>etc...
I use an include file I made which has conversion factors for a wide variety
of units. I simply include the file at the beginning of my scene, and then
I multiply the measurement by the name of the unit the measurement is in.
It defaults to 1 POV unit = 1 centimeter, but that can be changed, by
redefining the centimeter. For example:
#declare cm = 1/100; /* 1 POV unit = 1 meter */
#include "units.inc"
sphere{
-5*y*feet, 67*inches
pigment{ bozo scale feet }
finish{reflection .5}
translate x*-17*cm+y*2*yards
}
plane{y, -1*millimeters pigment{checker scale Decimeter}}
camera{location 0.0025*km look_at y*1000*1000*1000*Angstrom}
light_source{1, 93*1000*1000*miles}
The file's at http://www.geocities.com/Rengaw03/povray.html (called
Units.zip)
--
Mark
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Lieut_Data" <lIe### [at] yahOOcom> wrote in message
news:3c7bec2d@news.povray.org...
<snip>
Most transformations take place relative to <0,0,0>. This is particularily
important in relation to scaling and rotating.
Try scaling both
sphere{0,1}
and
sphere{<1,0,0>,1}
by and equal amount
Try rotating the two by an equal amount around y as well. When the result
doesn't suprise you and indeed seems blindingly obvious, then you know you've
got the essentials of POV's co-ordinate system....
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|