Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#POV-Ray, (削除) 199 (削除ここまで) 163

POV-Ray, (削除) 199 (削除ここまで) 163

Old version
camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}
Same output, but golfed down further by using default light/camera, so I dont even need to specify them
#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{<X+1,Y,9>,<.001*pow(-1,(X+Y)/2),0,.1>+<X+1,Y,9>,1}#end#end}object{L pigment{color rgb x}rotate z*90}object{L}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

#POV-Ray, (削除) 199 (削除ここまで) 163

Old version
camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}
Same output, but golfed down further by using default light/camera, so I dont even need to specify them
#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{<X+1,Y,9>,<.001*pow(-1,(X+Y)/2),0,.1>+<X+1,Y,9>,1}#end#end}object{L pigment{color rgb x}rotate z*90}object{L}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

POV-Ray, (削除) 199 (削除ここまで) 163

Old version
camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}
Same output, but golfed down further by using default light/camera, so I dont even need to specify them
#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{<X+1,Y,9>,<.001*pow(-1,(X+Y)/2),0,.1>+<X+1,Y,9>,1}#end#end}object{L pigment{color rgb x}rotate z*90}object{L}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

added 308 characters in body
Source Link
DenDenDo
  • 2.9k
  • 20
  • 18

#POV-Ray, 199(削除) 199 (削除ここまで) 163

Old version
camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}
Same output, but golfed down further by using default light/camera, so I dont even need to specify them
#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{<X+1,Y,9>,<.001*pow(-1,(X+Y)/2),0,.1>+<X+1,Y,9>,1}#end#end}object{L pigment{color rgb x}rotate z*90}object{L}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

#POV-Ray, 199

camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

#POV-Ray, (削除) 199 (削除ここまで) 163

Old version
camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}
Same output, but golfed down further by using default light/camera, so I dont even need to specify them
#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{<X+1,Y,9>,<.001*pow(-1,(X+Y)/2),0,.1>+<X+1,Y,9>,1}#end#end}object{L pigment{color rgb x}rotate z*90}object{L}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

Source Link
DenDenDo
  • 2.9k
  • 20
  • 18

#POV-Ray, 199

camera{location -9*z}light_source{-9*z}#declare L=union{#for(X,-9,9,2)#for(Y,-9,9,2)cylinder{X*x+x+Y*y,<.001*pow(-1,(X+Y)/2),0,.1>+X*x+x+Y*y,1}#end#end}object{L pigment{color x}}object{L rotate z*90}

enter image description here
I am using as many default parameters for camera and lightsource as possible, thats why it is a little dark. Lets ungolf it first

camera{location 9*z look_at 0}
light_source{9*z color 1} 
#declare L=union{
 #for(X,-9,9,2)
 #for(Y,-9,9,2)
 cylinder{<1+X,Y,0>, //central axis, start
 <1+X,Y,0> + <.001*pow(-1,(X+Y)/2), 0, .1>, //central axis, end
 1} //radius
 #end 
 #end
} 
object{L pigment{color x}} // x is the <1,0,0> vector, here interpreted as RGB
object{L rotate<0,0,90>}

It is obvious what is happening once we increase the offset of the cylinder axis and change the perspective

enter image description here

AltStyle によって変換されたページ (->オリジナル) /