Openscad - Povray

by Oliver Knill Would it be possible to write a conversion program which takes an openscad file and produces a povray file?

The following example is mentioned in this project on illustrating mathematics using 3D printers:
camera{up y right x location <1,3,-2> look_at <0,0,0>}
light_source { <0,300,-100> color rgb <1,1,1> }
background { rgb<1,1,1> }
#macro r(c) pigment{rgb c} finish {phong 1 ambient 0.5} #end

intersection {
  cylinder{<-1,0,0>,<1,0,0>, 1 texture {r(<1,0,0>)}}
  cylinder{< 0,-1,0>,<0,1,0>,1 texture {r(<1,1,0>)}}
  cylinder{<0,0,-1>,<0,0,1>, 1 texture {r(<0,0,1>)}}
}
And here is the Openscad version:
module cyl(a){rotate(90,a) cylinder(r=10,h=80,center=true);} 
intersection(){ cyl([0,0,0]); cyl([1,0,0]); cyl([0,1,0]); }
  • 3cylinders.pov
  • 3cylinders.scad