POV-Ray : Newsgroups : povray.binaries.images : Re: preview of deform patch (53 kbu) : Re: preview of deform patch (53 kbu) Server Time
1 Sep 2024 18:16:49 EDT (-0400)
  Re: preview of deform patch (53 kbu)  
From: Chris Huff
Date: 11 Dec 2000 14:20:09
Message: <chrishuff-00B1BF.14210211122000@news.povray.org>
In article <3a3505b6@news.povray.org>, "Wlodzimierz ABX Skiba" 
<abx### [at] abxartpl> 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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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