// Persistence of Vision Ray Tracer Scene Description File // File: ChaosInCreation.pov // Vers: 3.6 // Desc: Trace function demonstrator // Date: 30/01/2006 // Auth: Owl_Express aka Louis-Xavier BRUSSET // ----------------------------------------- // Copyright 2006 Louis-Xavier BRUSSET http://lx.brusset.online.fr/ // ----------------------------------------- // ----------------------------------------- // This work is licenced under the Creative Commons Attribution-Non-Commercial-ShareAlike 2.5. // To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-sa/2.5/ // or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. // You are free: // * to copy, distribute, display, and perform the work // * to make derivative works // Under the following conditions: // -> Attribution. You must give the original author credit. // -> Non-Commercial. You may not use this work for commercial purposes. // -> Share Alike. If you alter, transform, or build upon this work, you may distribute // the resulting work only under a licence identical to this one. // * For any reuse or distribution, you must make clear to others the licence terms of this work. // * Any of these conditions can be waived if you get permission from the copyright holder. // Your fair use and other rights are in no way affected by the above. // ----------------------------------------- // Cette création est mise à disposition selon le Contrat Attribution-NonCommercial-ShareAlike 2.5 // disponible en ligne http://creativecommons.org/licenses/by-nc-sa/2.5/fr // ou par courrier postal à Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. // Vous êtes libres : // * de reproduire, distribuer et communiquer cette création au public // * de modifier cette création // Selon les conditions suivantes : // -> Paternité. Vous devez citer le nom de l'auteur original. // -> Pas d'Utilisation Commerciale. Vous n'avez pas le droit d'utiliser cette création à des fins commerciales. // -> Partage des Conditions Initiales à l'Identique. Si vous modifiez, transformez ou adaptez cette création, // vous n'avez le droit de distribuer la création qui en résulte que sous un contrat identique à celui-ci. // * A chaque réutilisation ou distribution, vous devez faire apparaître clairement aux autres les conditions contractuelles // de mise à disposition de cette création. // * Chacune de ces conditions peut être levée si vous obtenez l'autorisation du titulaire des droits. // Ce qui précède n'affecte en rien vos droits en tant qu'utilisateur // (exceptions au droit d'auteur : copies réservées à l'usage privé du copiste, courtes citations, parodie...) // ----------------------------------------- // ==== Standard POV-Ray Includes ==== #include "functions.inc" // internal functions usable in user defined functions #include "math.inc" // general math functions and macros #declare ObjType=2; // perspective (default) camera camera { location <1,1,1>*4 look_at <0.0, 0.0, 0.0> right x*image_width/image_height } #macro AxeLight( Vecteur ) light_source { 5*Vecteur color rgb Vecteur } light_source { -5*Vecteur color rgb Vecteur } merge { cylinder { <0, 0, 0>, Vecteur*0.95, 0.005 } cone { Vecteur*0.9, 0.05, Vecteur, 0.0 } pigment {color rgb Vecteur } } #end AxeLight(x) AxeLight(y) AxeLight(z) #declare Rt = seed(12345); #declare Rp = seed(67891); #switch (ObjType) #case(1) #declare R1 = seed(0); #declare My_Object = sphere { <0, 0, 0>, 1 } #break #case(2) #declare R1 = seed(0); #declare R2 = seed(12345); // place sphere with random radius at random position // use different random number streams for position and radius #declare My_Object = blob{ threshold 0.6 #local i=0; #while (i<100) sphere { <1-(2*rand(R1)),1-(2*rand(R1)),1-(2*rand(R1))>, rand(R2), 1 } #local i=i+1; #end } #break #end #local i=0; #while (i<100) #declare Norm = <0, 0, 0>; #declare Theta=radians(360*rand(Rt)); // Theta component in spherical coordinates #declare Phi =radians(90-(180*rand(Rp))); // Phi component in spherical coordinates #declare Start = <10*cos(Phi)*cos(Theta), 10*sin(Phi), 10*cos(Phi)*sin(Theta)>; // Start Point For Trace #declare Inter=trace ( My_Object, Start, <0, 0, 0>-vnormalize(Start), Norm ); // Trace function object { My_Object pigment { rgb 1 transmit 0.85 } } #if (vlength(Norm)!=0) //#declare MyColor=; #local MyColor=1; // First vector, from center to surface merge { cylinder { <0, 0, 0>, Inter*0.95, 0.005 } cone { Inter*0.9, 0.05, Inter, 0.0 } pigment {color rgb MyColor transmit 0.5 } } // Second vector, from surface, normal direction merge { cylinder { Inter, Inter+Norm*0.95, 0.005 } cone { Inter+Norm*0.9, 0.05, Inter+Norm, 0.0 } pigment {color rgb MyColor transmit 0.5 } } // This sphere to materialize Tracing start #declare InterCoef=(vlength(Inter+Norm))/vlength(Inter); sphere { Inter*InterCoef, 0.05 pigment {color rgb MyColor transmit 0.5 } } #end #local i=i+1; #end