POV-Ray : Newsgroups : povray.general : Units of Measure : Re: Units of Measure Server Time
4 Nov 2024 23:16:38 EST (-0500)
  Re: Units of Measure  
From: ABX
Date: 26 Aug 2003 12:37:38
Message: <gq1nkvsldnbj4ui2he626l1vto6t7qfb3k@4ax.com>
On Tue, 26 Aug 2003 17:06:21 +0100, "Alan Smith" <ala### [at] aurora-ukcom>
wrote:
> As I said in my original posting, I would not want to force people to
> have to use units on dimensions - it would be optional.
> Quote - "This would surely be a simple modification to the parser and
> would still leave the ability for people to work in a 'unit-less' fashion if
> they like?"

From what experience "surely" in that quote come? This is exactly my
opportunity. There is probably much work and the only benefit is that you
don't have to type "*" because "cm" still have to be typed. But some people
will complain that they do not want "1cm" - they want "1 cm" or "1 CM" or
"1centimeter". Moreover more possibilities, and making this unit optional
makes parser only more complicated internally and increases parsing time.

> You said there is no difference between various units.inc - I beg to differ.

Then you do not understand that text is translated into floats during _final_
parsing, not during posting scene or object via mailer. Simple, imagine you
have units.inc:

  #declare cm=0.75;
  #declare m=100*cm;
  #declare km=1000*m;

and a scene:

  #version 3.5;
  global_settings{assumed_gamma 1.0}
  camera{
    up 1*cm 
    right (image_width/image_height)*cm 
    direction z*1*cm
    location -10*z*cm
    look_at 0
  }
  light_source{90*m rgb 1}
  sphere{ 0 1*km pigment{agate scale .5*km}}

render it to image1.png. Now send it to your friend and ask to write own
units.inc. The only requirement is that it has to define cm, m, km in correct
_relation_. Now ask him for rendering to image2.png. Then compare result. Note
he don't have to cm as base. He can for example made his units.inc as:

  #declare m=12*76.13/143;
  #declare cm=.1*m;
  #declare km=1000*m;

And now tell me. Is result different ? :-)

ABX


Post a reply to this message

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