POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

Attached to Project: POV-Ray
Opened by Christoph Lipka - 2010-04-14
Last edited by William F Pokorny - 2017-01-19

FS#96 - User-defined warps

User-defined warps would be nice to have, something along the lines of:

warp {
  function { MyFnX(x,y,z) } // function to compute pattern-space x-coordinate from object-space <x,y,z> coordinate
  function { MyFnY(x,y,z) } // ditto for pattern-space y coordinate
  function { MyFnZ(x,y,z) } // ditto for pattern-space z coordinate
}

// a displacement warp:
warp {
  function { x + MyFnX(x,y,z) }
  function { y + MyFnY(x,y,z) }
  function { z + MyFnZ(x,y,z) }
}
Žan Trajkov commented on Thursday, 15 April 2010, 12:46 GMT

Hi,

i think, i should look in some older source archives of my private POV build. :-) Sometime last year or earlier i think i implemented this functionality in an early beta version of the sources of POV3.7

If i found the code, i could donate this functionality. :-) I should check, if the code is complete for donation.
I haven't time to finish it for publishing (code clean-up, examples, docu text snippets) and then i forgot it.

If you are interested, i will check, if i can "port" it to last public available source base of POV3.7 and create at patch
of the differences. I could also send it to you "raw".

I'm at moment not at home, but i will give feedback here, when i checked it.

Greetings from Germany
GMZ

Admin
Christoph Lipka commented on Thursday, 15 April 2010, 13:21 GMT

Thanks Zan - that would be very much appreciated!

Please don't submit diff files though; part of the codebase still keeps changing fast, and it's easier for the dev team to merge complete files. A patched older beta would then do almost as fine as the most recent one.

As for polishing it all up: If needs be, I guess I'd volunteer to help with that part of the job.

(Greetings both from and to Germany :-))

Žan Trajkov commented on Friday, 16 April 2010, 08:29 GMT

I've checked my sources and luckily I found the code. :-) I have coded it 2 years ago in february 2008. It looks like that all
code is ready for publishing and I think refactoring needs are minimal.
Hope, it will be a good starting point for inclusion.

The codebase is POV3.7Beta25b → rather old. :-)

I've zipped the whole directory. Please pick up what you need.

For inclusion of my code into MegaPOV, i have marked my changed
places with a ZTV_FUNCTION_WARP-define. I never mind, it will be
"directly" included into official POV... ;-)

Last evening I start VS2005 and try to check at least my last test.pov
file with one of the POV example scenes (warps.pov?), where i changed
the warp type to function warp, but I lost. My Beta25b has too much expired!
No chance to check it.
What will be a good test scene? Your example at the bug tracker?

Documentation:


function warp:
Allows you to use a function { } block as warp.

FUNCTION_WARP:
warp {

function { USER_DEFINED_FUNCTIONS }
}

example: maybe your code snippet from FS#96

What can be used: see description of "function as pattern" (section 5.4)

Hint:
The function warp uses the X, Y, Z values for setup the calculation engine.

License:


I donate the code on a as-is base. If it fits in your needs, use it freely! :-) If it not fit, modify it... :-) I left it to the POV-Team to choose a suitable license for this code. This include
the right to change the license(s) to whatever the POV-Team need, anytime. It's not
needed to ask me for permission for a license change, modification, etc.
Hope, this is clear... :-)

So, enough words written.

Please look at the sources and use, what is suitable.
Criticism, tips, questions, etc are always welcome... :-)

Thanks for your help to polish up things.

Greetings
Žan
PS.: <german>Schön, daß es noch eine nützliche Verwendung für meinen Code gibt.<\german> :-) PPS.: Sorry for my (possible) bad english

Thorsten Fröhlich commented on Tuesday, 23 August 2011, 06:15 GMT

Christoph, I assume you would be willing to review and add this past 3.7 release?

William F Pokorny commented on Thursday, 19 January 2017, 15:02 GMT

Now tracked on github as issue #193.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing