POV-Ray : Newsgroups : povray.general : Blob of a Union : Re: Blob of a Union Server Time
6 Oct 2024 09:08:18 EDT (-0400)
  Re: Blob of a Union  
From: Simulator
Date: 17 Jan 2014 01:10:00
Message: <web.52d8c8b7b8e8949ae9d526ea0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 16.01.2014 12:26, schrieb Simulator:
> > I use a visualization software that generates pov ray files. I have the
> > following declared
> >
> > #declare VertGlyph = object { sphere {<0,0,0>,1} };
>
> You should better make this a macro, otherwise it won't work with blobs.
> (The "sphere" statements in blobs aren't objects proper.)
>
> E.g.:
>
> #macro VertGlyph(Radius,Pos)
>    sphere { Pos, Radius, strength 1.0 }
> #end
>
> > #declare vertex_geometry = union
> > {
> > #declare vertctr=0;
> > #while (vertctr < nverts0000)
> > #declare vertvalue=ptscalars[verts[vertctr][1]];
> >        object {
> >          VertGlyph
> >          scale VertScaleFunction(vertvalue)
> >          translate pts[verts[vertctr][1]]
> >        }
> > #declare vertctr = vertctr+1;
> > #end
> > };
>
> You should then be able to modify the vertex_geometry as follows:
>
> #declare vertex_geometry = blob
> {
> #declare vertctr=0;
> #while (vertctr < nverts0000)
> #declare vertvalue=ptscalars[verts[vertctr][1]];
>           VertGlyph(
>             VertScaleFunction(vertvalue),
>             pts[verts[vertctr][1]]
>         )
> #declare vertctr = vertctr+1;
> #end
> };
>
> (BTW, POV-Ray now supports a #for statement that makes counted loops
> easier.)


I have tried this an the above suggestions. I still get the same error "Need at
least one component in blob."


Post a reply to this message

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