 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
What are the odds of this?
For instance, if I define a sphere{}, and pass it as an argument to
something, I'd like that function to have access to information about
the sphere. Both shape specific (ie, center and radius), as well as
generic (texture / transformations).
Once this is possible, then it's a trivial step to add a "world" or
"scene" object which is simply a union of everything.
And that makes all kinds of fun tricks available ;)
---
On a separate note, I was looking at Thomas de Groot's image in p.b.i,
"Ruined Place", and reading Jim's reply about moss growing where the sun
doesn't reach. Giving SDL access to more POV-Ray internals would enable
things like asking POV to gather radiosity (or even simple lighting)
samples at a particular point and return the result, allowing a scripted
application of moss in the shade...
--
...Ben Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers <ben [at] pacificwebguy com> wrote:
> What are the odds of this?
One of the main points of pov4 is that it should have a better scripting
language.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Chambers <ben [at] pacificwebguy com> wrote:
>> What are the odds of this?
>
> One of the main points of pov4 is that it should have a better scripting
> language.
>
Nice :) But I had to ask, since "a better scripting language" doesn't
really tell us much, so I wasn't sure if this was being considered or not.
--
...Ben Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Both properties and methods. Unions should have an add_object method :)
Now:
union {
#while(I<10)
sphere { x*I, 0.1 }
#declare I=I+1;
#end
}
Or, in loops which have things much more complex than that (for example
if you need to trace() all the created spheres in order to create one more):
#declare Obj = union{};
#while(I<10)
#declare Obj = union { object{Obj} sphere { x*I, 0.1 } };
#declare I=I+1;
#end
(I heard POV-Ray has a special optimization for this, to make the final
in-memory CSG be a flat union like from the first example, instead of a
nested union)
So I'd like:
obj = union{};
while(I<10) {
obj.add(sphere { x*I, 0.1 });
I++;
}
(I'm not suggesting this script syntax, just the concept of adding
objects to already-created CSG structures)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> What are the odds of this?
>>
>> One of the main points of pov4 is that it should have a better
>> scripting
>> language.
>>
>
> Nice :) But I had to ask, since "a better scripting language" doesn't
> really tell us much, so I wasn't sure if this was being considered or not.
Ideally it would be good enough that we wouldn't have to use another
language to generate POV code. I regularly use C++ to generate POV code,
just because the SDL is too slow and clumsy for dealing with arrays of
objects for animation. It's a shame because it would be much nicer to be
able to do that stuff within POV itself.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |