POV-Ray : Newsgroups : povray.general : Can a variable not hold blob components ? : Re: Can a variable not hold blob components ? Server Time
9 Aug 2024 13:24:51 EDT (-0400)
  Re: Can a variable not hold blob components ?  
From: Tor Olav Kristensen
Date: 10 Jul 2000 22:40:52
Message: <396A88C1.9F6CE833@online.no>
Josh English wrote:
> 
> When I get this error with blobs, I start adding commas. I'd try
> removing the strength keywords with commas in the Spike and Ball
> declaration and see if it works. 

I think I tried that and found 
that this didn't work either.


> You might also add the strength value
> as a parameter in the macro and add it in the macro instead ofthe
> declarations, so that Spike and Ball can be used outside of a blob as
> well.

But I can see no way that the 
macro can modify an object {} 
passed to it in a variable, so 
that it becomes a blob component.

I.e.: One cannot do this (I think):


#declare Spike = cylinder { 0, y, 0.1 }

#declare Ball = sphere { <0, 0, 0>, 0.5 }

#macro InsertComp(Component, Strength, Position)

  object {
    Component
    strength Strength
    translate Position
  }

#end // macro InsertComp


blob {
  threshold 0.3
  InsertComp(Ball, 0.5, <0, 1, 0>)
  InsertComp(Spike, 0.3, <0, 1, 0>)
  pigment { color <1, 0, 0> }
}


Thank you for commenting btw.


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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