Logo by Kaliyuga - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. September 19, 2020, 11:27:16 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Simple 3D IFS in POV-Ray  (Read 3339 times)
0 Members and 1 Guest are viewing this topic.
utak3r
Alien
***
Posts: 26


WWW
« on: March 17, 2010, 11:30:37 AM »

I've put online a sample source for POV-Ray, describing, how to make IFS systems in this great software.
You can learn from it, how to design recurrent macros in POV-Ray.
You can download it from deviantArt.


Usage:

The main core code is following:
Code:
#macro OBJ_atom(srodek, obrot, promien)
    union {
        torus {
            promien, promien*0.2            
            rotate obrot
            translate srodek
        }
        sphere {
            srodek promien*0.4
        }            
    }  
#end
      
#macro OBJ_punkty(srodek, R, obrot, iter)
    #if (iter > 0)                                
        OBJ_punkty(<srodek.x + R, srodek.y, srodek.z>, R*0.8, z*90, iter-1)
        OBJ_punkty(<srodek.x - R, srodek.y, srodek.z>, R*0.8, z*-90, iter-1)
        OBJ_punkty(<srodek.x, srodek.y + R, srodek.z>, R*0.8, y*90, iter-1)
        OBJ_punkty(<srodek.x, srodek.y - R, srodek.z>, R*0.8, y*-90, iter-1)
        OBJ_punkty(<srodek.x, srodek.y, srodek.z + R>, R*0.8, x*90, iter-1)
        OBJ_punkty(<srodek.x, srodek.y, srodek.z - R>, R*0.8, x*-90, iter-1)
        OBJ_atom(srodek, obrot, R*0.7)
    #else                        
        OBJ_atom(srodek, obrot, R*0.7)
    #end    
#end      

What you will put in OBJ_atom, is the smallest shape (an atom). It can be a sphere or anything you like, it can be even a sophisticated object - it doesn't matter. OBJ_punkty defines the procedure of creating IFS system, you can change it as you like, it's really simple.

The image above shows the sample effect, rendered at the first, second, and the fifth iteration.
If you have any questions, don't hesitate to ask smiley
« Last Edit: March 19, 2010, 08:11:27 AM by Nahee_Enterprises » Logged
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #1 on: March 19, 2010, 08:16:44 AM »

I've put online a sample source for POV-Ray, describing how to
make IFS systems in this great software.

Nice images!!  Have always enjoyed this program and what all it is capable of producing.  Thank you for sharing your code.
 
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
simple algebra to the 3d mandelbrot Theory « 1 2 » kujonai 23 6261 Last post January 08, 2013, 12:29:42 PM
by jehovajah
Okay...this tyme I'll keep it simple! Images Showcase (Rate My Fractal) thom 0 573 Last post May 31, 2012, 12:56:08 AM
by thom
Probably a very simple question.... Help & Support fgib57 3 382 Last post July 14, 2013, 05:57:36 PM
by fgib57
Log spiral DE in a simple way (new) Theories & Research DarkBeam 5 442 Last post October 07, 2013, 06:49:25 PM
by DarkBeam
I think i have a simple problem Other / General Discussion veniema 3 1321 Last post February 20, 2014, 07:46:16 PM
by veniema

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.165 seconds with 27 queries. (Pretty URLs adds 0.009s, 2q)