// Persistence of Vision Ray Tracer Scene Description File // File: surcoat2holo.pov // Vers: 3.6 // Desc: Uses SurCoat to create a data-file for CGH-Maker, // in XML format. I'm fairly sure that CGH uses a left handed system, given what I've seen. // Date: 2/13/05 // Auth: Sam Bleckley // #version 3.6; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <0.0, 0, -4.0> look_at <0.0, 0.0, 0.0> } // ---------------------------------------- #declare holoObject = sphere { 2*z, .5 } //Surcoat // Surcoat-Macros for POV-Ray 3.6.1 // Tim Nikias Wenclawiak // a.k.a. "Tim Nikias v2.0" // //Homepage: // www.nolights.de //Email: // timnikias@gmx.net //Default values #include "surcoat.inc" //Topview is not declared as this avoids the pretesting-subroutine. Declaring // it as a white pigment will start the subroutine, but with the same effect: // all cells have to be sampled. //#declare Surcoat_Topview = pigment{rgb 1} #declare Surcoat_Debug = on; #declare Surcoat_Seed = 260981; //The origin of the samples is a rectangle which matches the image-result of // the Orthoview-macro. The actual unit-size of the object multiplied with // the desired resolution will define the resolution of the grid layed on top // of this rectangle. Per cell, the given amount of samples will be shot at // the object. #declare Surcoat_CellResolution = 8; #declare Surcoat_CellSamples = 10; //The coating is done along a certain direction. #declare Surcoat_Sample_Direction = z; //Samples of which the surface-normal deviates from the given shooting direction // by more than the given angle (in degrees) will be dropped. 90 ensures that // every surface up till perpendicularity will get coated. #declare Surcoat_Sample_MaxDirectionDeviation = 90; //This will switch off the DirectionDeviation-Check completely and every hit onto // the object, no matter if top- or bottomside, will be saved. #declare Surcoat_Sample_OverrideDirection = 0; //For accuracy reasons, an offset can be defined for the sorting macro, as shooting // trace()-rays exactly from a sample's position can yield different results (e.g. // it might hit the exact same surface right away, or pass through and hit the next // one, depending on transformations and internal representations, to circumvent this, // the trace()-ray will be offset by the given amount along the normal). #declare Surcoat_Sample_Offset = .0001; //Samples the object's surface with the given settings Surcoat_CreateSamples(holoObject) //Saves unsorted samples Surcoat_SaveSurface("holo.txt") //Visualizes samples with spheres union{ Surcoat_Spheres("holo.txt",.025) pigment{rgb 1} } #fopen holo "holo.txt" read #fopen holoxml "woonew.xml" write #write(holoxml, " ") #while (defined(holo)) #declare myPoint = <0, 0, 0>; #declare myNorm = <0, 0, 0>; #read (holo,myPoint, myNorm) #write(holoxml, " ") #end #write(holoxml, "")