Class: Mageo::Sphere
- Inherits:
-
Object
- Object
- Mageo::Sphere
- Defined in:
- lib/crystalcell/povray/sphere.rb
Instance Method Summary collapse
- #dump(io) ⇒ Object
-
#to_pov(color) ⇒ Object
povray 形式の文字列を返す。 color は Float による配列。通常、0〜1の範囲。.
Instance Method Details
#dump(io) ⇒ Object
11 12 13 |
# File 'lib/crystalcell/povray/sphere.rb', line 11 def dump(io) io.puts self.to_pov end |
#to_pov(color) ⇒ Object
povray 形式の文字列を返す。 color は Float による配列。通常、0〜1の範囲。
6 7 8 9 |
# File 'lib/crystalcell/povray/sphere.rb', line 6 def to_pov(color) sprintf( "object { sphere{<% 7.4f, % 7.4f, % 7.4f>, %7.4f} pigment {color rgb <%4.2f, %4.2f, %4.2f>} }", *position, radius, *color) end |