|
![](/i/fill.gif) |
In article <3a3505b6@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> deform {
> TYPE
> contained_by{ CONTAINER }
> [ DEFORM_PARAMETERS ]
> [ DEFORM_TYPE_PARAMETERS ]
> [ object modifiers ... ]
> }
I think a much more intuitive syntax would be:
deform {
DEFORMED_OBJECT
deformation {WARP}
DEFORM_PARAMETERS
OBJECT_MODIFIERS
}
I would also use "weighted_normals" or "weight_normals" instead of
"normal_weighted", "twist" instead of "turn", and a few other little
changes. If the object has a texture, it is deformed along with the
object. If a texture is given in the deform{} block, it isn't deformed.
This would be used like this:
deform {
sphere {...}
deformation {turbulence 0.5}
accuracy 0.01
normal_accuracy 4, 0.001
weighted_normals on|true|yes|off|false|no
// the on/off/etc... would be optional, using
// only the keyword would turn it on.
}
Also, I don't know how your deformations work, but it would make sense
to use the warps to do the job, since you are really just warping an
object instead of a pattern. If you do this, you can avoid a lot of
duplicated work by implementing a single warp.
The equivalent code for what you wrote with my suggested syntax would be:
deform {
box {-1, 1 texture {Texture}}
type {twist y, 8}// twist AXIS, TWISTS_PER_UNIT_DISTANCE
accuracy 0.05
normal_accuracy 3, 0.01
weighted_normals
}
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |