用Wolfram語言畫的黃色小鴨

這是一個Wolfram Graphics3D練習,跟 Manipulate 練習

Graphics3D[{Yellow, Ellipsoid[{1, 0, -1.8}, {2, 2.3, 1.4}], 
  Sphere[{0, 0, 0}, 1.3], Black, 
  Sphere[{{-0.5, -0.5, 0.45}, {-0.5, 0.5, 0.45}}, 0.55], White, 
  Sphere[{{-0.75, 0.61, 0.65}, {-0.75, -0.61, 0.65}}, 0.22], Red, 
  Tetrahedron[{{0, -1.1, 0}, {0, 1.1, 0}, {-1.5, 0, 0}, {0, 0, 
      0.25}} + Threaded[{-0.55, 0, 0}]]}, ViewPoint -> Left, 
 Boxed -> False]
(*Manipulate*)
Manipulate[
 Graphics3D[{Yellow, Ellipsoid[{1, 0, -1.8}, {2, 2.3, 1.4}], 
   Sphere[{0, 0, 0}, 1.3],
   
   Black, Sphere[{{a, -b, c}, {a, b, c}}, r],
   White, Sphere[{{-0.75, 0.61, 0.65}, {-0.75, -0.61, 0.65}}, 0.1], 
   Red, Tetrahedron[{{0, -1, 0.25}, {0, 1, 0.25}, {-1.5, 0, 0.25}, {0,
        0, 0}} + Threaded[{-0.5, 0, 0}]]}, 
  ViewPoint -> Left], {{a, -0.5}, -2, 2}, {{b, -0.5}, -2, 
  2}, {{c, 0.4}, -2, 2}, {{r, 0.5}, 0, 1}]

轉出STL檔,轉到其他平台

body = DiscretizeGraphics[Ellipsoid[{1, 0, -1.8}, {2, 2.3, 1.4}], 
   PlotRange -> {{-30, 10}, {-30, 30}, {-30, 30}}, 
   MaxCellMeasure -> 0.001];
head = DiscretizeGraphics[Sphere[{0, 0, 0}, 1.3], 
   PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, 
   MaxCellMeasure -> 0.001];
eye = DiscretizeGraphics[
   Sphere[{{-1, 0.45, 0.4}, {-1, -0.45, 0.4}}, 0.3], 
   PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, 
   MaxCellMeasure -> 0.001];
eyeball = 
  DiscretizeGraphics[
   Sphere[{{0, 0.41, 0}, {0, -0.41, 0}} + 
     Threaded[{-1.2, 0, 0.45}/10], 0.1], 
   PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, 
   MaxCellMeasure -> 0.001];
beak = DiscretizeGraphics[
   Tetrahedron[{{0, -1.1, 0.25}, {0, 1.1, 0.25}, {-1.5, 0, 0.25}, {0, 
       0, 0}} + Threaded[{-0.5, 0, -0.3}]], 
   PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}}, 
   MaxCellMeasure -> 0.001];
final = RegionUnion[body, head, eye, eyeball, beak]
Export["C:\\draw.stl", final]

發表留言