POV-Ray : Newsgroups : povray.general : Status of Moray? : Re: New SDL for POVRay Server Time
15 Jul 2025 08:49:30 EDT (-0400)
  Re: New SDL for POVRay  
From: andrel
Date: 30 Sep 2007 18:01:53
Message: <47001DD0.2010800@hotmail.com>
Before adding it to my temporary (until the wiki comes on-line) 
new-POV-page (http://members.chello.nl/a.c.linnenbank/newsdlforpov.html)
I though it would be better to discuss here.

Just an observation:
The syntax for our objects is what makes POV different from most other 
languages its syntax is something like:

object{parameters modifiers)

e.g.

sphere{ <x,y,z>,r
   pigment{rgb <r,g,b>}
   rotate <rx,ry,rz>
   translate <tx,ty,tz>
}

Note that there a re three totally different arguments here.

- the assignment to pigment could be though of as accessing a class 
element, more conventionally denoted as sphere.pigment=...
That might also be the standard (preprocessor ;) ) translation if POV4 
will be based on another language.
There is also the concept that you can have a pigment statement where 
ever you need a texture.

- <x,y,z> and r are unnamed but in a definition of sphere they could be 
defined as (introducing a new object definition syntax [1])

object: sphere(vec3D: location, scalar: radius)

so if you know this definition you could access sphere.location and 
sphere.radius

- the family of modifiers that change the appearance of the object 
(rotate, translate, scale and such). The members of this family interact 
so the natural interpretation is that these are member functions.

[1] do we need a object definition syntax in POV4? I think we do, how 
else could we define new object types? This may also be the point to 
mention that the current set of primitive objects is far from 
consistent. We have sphere{<Center>, Radius} while we also have 
box{<Corner_1>,<Corner_2>}, why don't we have cube{<Center>, size} or
cube{<Center>, <size>}? And why do we have to translate the 
superellipsoid manually with a translate?

PS: what exactly was my point? I am sure I have seen it less than half 
an hour ago.


Post a reply to this message

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