POV-Ray : Newsgroups : povray.advanced-users : Using a Macro to add children to a predeclared object Server Time
29 Jul 2024 16:33:47 EDT (-0400)
  Using a Macro to add children to a predeclared object (Message 1 to 3 of 3)  
From: John D  Gwinner
Subject: Using a Macro to add children to a predeclared object
Date: 4 Jan 2002 01:48:07
Message: <3c355027$1@news.povray.org>
Ok ... is that possible?

Specifically, I have a POV-Ray macro that can generate a series of objects.

I want to include this in a Moray scene file.

I want to have the .inc file 'add' these objects to a specific named Moray
object (a union or group).

Something like:

#AddChild( MyCSG, object { myincobject} }

(If I was just using POVRay, I'd just put the macro inside the specific
named group, obviously).

The issue is that Moray will add the include file before the rest of the
Moray file, so I can't include my object inside the Moray csg without hand
editing the Moray exported file.

I've been looking to use Moray to do some animations, but I have a bad
feeling I'll have to use Moray to model and animate the completed scene with
POVRay to do what I want; i.e. including Moray into POVRay instead of the
other way around.

The other option I guess is to build a Moray plug in ...

                  == John ==


Post a reply to this message

From: JRG
Subject: Re: Using a Macro to add children to a predeclared object
Date: 4 Jan 2002 13:41:43
Message: <3c35f767@news.povray.org>
If you're familiar with C you could write a simple program which uses fgetc() or
fscanf() and strcmp() to achieve what you need.

--
#local j=text{ttf"arial""JRG".2,0}#local J=0;#while(J<10)#local R=0;#while
(R<2)#local G=0;#while(G<1)#if(inside(j<R,G.1>))object{j scale.025translate
<R-1G-J/20J/-40+2>pigment{rgb<9J>}}#debug"O"#else#debug" "#end#local G=G+
.025;#end#local R=R+.05;#debug"\n"#end#local J=J+1;#end// JRG

Home: http://digilander.iol.it/jrgpov


Post a reply to this message

From: John D  Gwinner
Subject: Re: Using a Macro to add children to a predeclared object
Date: 4 Jan 2002 16:41:59
Message: <3c3621a7@news.povray.org>
Right, that would work, but then I could also just do the POV way too.  I
was trying to set it up so I could add a .include in Moray and do the
animations from within Moray.

I'll probably have to use Moray to 'model' the scene, which means if I see
something wrong in the model, I'll have to re-export the .pov file from
Moray and edit it by hand every fiddle/run/fiddle cycle.

                  == John ==

"JRG" <jrg### [at] hotmailcom> wrote in message
news:3c35f767@news.povray.org...
> If you're familiar with C you could write a simple program which uses
fgetc() or
> fscanf() and strcmp() to achieve what you need.
>
> --
> #local j=text{ttf"arial""JRG".2,0}#local J=0;#while(J<10)#local R=0;#while
> (R<2)#local G=0;#while(G<1)#if(inside(j<R,G.1>))object{j
scale.025translate
> <R-1G-J/20J/-40+2>pigment{rgb<9J>}}#debug"O"#else#debug" "#end#local G=G+
> .025;#end#local R=R+.05;#debug"\n"#end#local J=J+1;#end// JRG
>
> Home: http://digilander.iol.it/jrgpov
>
>
>


Post a reply to this message

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