POV-Ray : Newsgroups : povray.binaries.images : problem with functions.inc : problem with functions.inc Server Time
10 Jun 2024 21:05:53 EDT (-0400)
  problem with functions.inc  
From: Norbert Kern
Date: 1 Sep 2015 07:30:02
Message: <web.55e58a984a2649cbe2e8c9770@news.povray.org>
Hi,
here is minimal code for the famous burning ship fractal.
It renders fine as long as I don't include functions.inc (in another context I
need functions.inc).
Does anybody know the reason?


// using code from Tor Olav Kristensen / Slime  Difference Small objects and
Glass Cube
http://news.povray.org/povray.general/message/%3C41493956%241%40news.povray.org%3E/#%3C41493956%241%40news.povray.org%3
E

// formula from Paul Nylander  Fractals
http://bugman123.com/Fractals/index.html

#version 3.7;

global_settings {
        assumed_gamma 2.2
}

//#include "functions.inc" // uncommenting this line will cause a crash
                           // (3.7.0.msvc10.win64 / 3.6.2.msvc9.win64)
camera {
        location <0,0,-1>
        look_at <0,0,0>
        right x*image_width/image_height
        up y
        sky -y
        direction z*1.5
}

#declare IterFn =
function (N, Re, Im, Zr, Zi) {
        select (
                N > 300 | Zr*Zr+Zi*Zi > 4,
                0,
                IterFn (N+1, Re, Im, Zr*Zr-Zi*Zi+Re, 2*abs (Zr*Zi)+Im),
                N/300
        )
}

#declare BurningShip = function (Re, Im) {IterFn (0, Re, Im, Re, Im)}

plane {
        -z, -2.5
 texture {
                pigment {
                        function {BurningShip (x,y)}
                        color_map {
                                [0      rgb -1]
                                [0.01   rgb 1]
                                [1      rgb -1]
                        }
                }
                finish {ambient 1}
                translate <1.745,0.0375,0>
                scale 27
        }
}

Norbert Kern


Post a reply to this message


Attachments:
Download 'burning_ship_fn.jpg' (319 KB)

Preview of image 'burning_ship_fn.jpg'
burning_ship_fn.jpg


 

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