crystal_ball


使用球座標建立水晶球體。

Spherical coordinates (r, θ, φ) often used in mathematics

相依模組:rotate_p, cross_sections, polysections, ring_extrude, shape_pie.

參數

  • radius : 球半行。
  • theta : 預設為 360 度,也接受 [ang1, ang2] 形式,指出起始與終止角。
  • phi : 預設為 180 度,也接受 [ang1, ang2] 形式,指出起始與終止角。
  • $fa, $fs, $fn : 詳見 circlesphere 模組說明。因為是水晶球體,在 XZ 剖面的邊數會被計算為四的倍數。

範例

include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <ring_extrude.scad>;
include <shape_pie.scad>;
include <crystal_ball.scad>;

crystal_ball(radius = 6);

translate([12, 0, 0]) 
    crystal_ball(
        radius = 6, 
        theta = 270,
        $fn = 12
    );

translate([24, 0, 0]) 
    crystal_ball(
        radius = 6, 
        theta = 270,
        phi = 90,
        $fn = 12
    );    

translate([36, 0, 0]) 
    crystal_ball(
        radius = 6, 
        theta = [-30, 270],
        phi = [30, 60]
    );        

crystal_ball