|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
John VanSickle <evi### [at] hotmailcom> wrote in
news:3F26A95E.4D3834F1@hotmail.com:
>
> PS: Pardon me if this has been done.
Sonya Roberts did it in 1997 ;) From micrometer to lightyear
http://www.imp.org/media/archives/units.zip
--
Tom
_________________________________
The Internet Movie Project
http://www.imp.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Also sprach Christopher James Huff <cja### [at] earthlinknet> -- Tue, 29 Jul
2003 12:41:45 -0500:
>
>What I do is just define cm, mm, m, km, etc at the beginning of the
>scene. Then I just do something like "15.7*m" when specifying a
>dimension. A macro version could also work, something like: "km(45)"
>
>I do use lowercase identifiers here, but I don't think a collision is
>likely for these and it helps separate them from the rest of the code.
I do a similar thing.
#declare inches=1;
#declare inch=1;
#declare feet=12*inches;
#declare foot=feet;
which makes it nice to say
#declare blah=6*feet+4*inches; // super American dumbkopf mode of measuring.
One of the important things (to me) in modeling is to remember to scale
*everything*.
This construct is guaranteed to cause trouble:
#declare mysize=4*inches;
difference {
box {
<-mysize/2,-mysize/2,-mysize/2>
<mysize/2,mysize/2,mysize/2>
}
cylinder {
z*-mysize/2-1, z*mysize/2+1 // <-- evil plus and minus 1
1*inches
}
}
I always used +/- 1 (or 100) when doing CSG, to avoid coincidence.
When i started rescaling my objects (#declare feet=1; #declare inch=1/12;)
these +/- 1s really bit me in the butt. It's important to say
z*-mysize/2-1*inch, z*mysize/2+1*inch
+++
I also have a couple of non linear predefines:
#declare pi2=pi*2;
#declare rot180=pi;
#declare rot90=pi/2;
#declare rot45=pi/4;
which are useful in sin and cos.
dik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 29 Jul 2003 14:01:39 -0700, gonzo quoth:
> How do all you POV masters handle your units?
I've got a file that I include called "units.inc" that defines assorted
units of measurement in terms of each other. It defaults to 1 cm = 1 POV
unit, but if I change the definition of a centimeter before including the
file, it adjusts all units accordingly. This way, I can mix inches,
centimeters, feet, and light years without any trouble.
--
Mark
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher James Huff wrote:
>In article <web.3f26e01d9c12b543a0c272b50[at]news.povray.org>,
>
>You could also base them all off of one value:
>
>#declare m = 1;
>#declare cm = m/100;
>#declare mm = m/1000;
>#declare km = m*1000;
>#declare in = m/0.0254;
>#declare ft = in*12;
>#declare yd = ft*3;
>#declare mi = km/1.607347;
>
>This way, you only have one constant to change...the number of units in
>a meter, in this case. If everyone uses the same unit names, all you
>have to do is change that value. (or just remove it and place it
>elsewhere, such as in a "units.inc" file)
>
Yes, that is what I meant. I define Ft = 1 unit, then everything else is
based on Ft. So far I haven't used much past yards though... guess I need
to expand my horizons to get into light years ;-)
RG
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mark Wagner wrote:
>On Tue, 29 Jul 2003 14:01:39 -0700, gonzo quoth:
>
>> How do all you POV masters handle your units?
>
>I've got a file that I include called "units.inc" that defines assorted
>units of measurement in terms of each other. It defaults to 1 cm = 1 POV
>unit, but if I change the definition of a centimeter before including the
>file, it adjusts all units accordingly. This way, I can mix inches,
>centimeters, feet, and light years without any trouble.
>
>Mark
>
Thanks all for the comments & insights! I hope John got the info he needed
from this thread, but even if he didn't I certainly found it informative!
This was something I had recently been running up against since my
"architecture" IRTC entry. That one pretty much demanded a standardized
method of scaling, so I started using feet since most building specs (at
least here in the US) are in feet.
Once I started using that though, I found I had problems with earlier models
where I had hard coded numbers or used arbitrary unit sizes. Some were so
bad it was easier to build a new model than to convert the old one!
So now I have my unit standard, and it sounds like enough people are using a
system similar enough that conversion shouldn't be a major issue. (And I
should have some good objects to share in my surreal IRTC entry, as long as
I get it done in time...)
Thanks again!
RG
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|