エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
sketchupでruby その18 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
sketchupでruby その18 - Qiita
def tama p1 = Geom::Point3d.new 0, 0, 0 p2 = Geom::Point3d.new 10, 10, 10 entities = Sketchup.act... def tama p1 = Geom::Point3d.new 0, 0, 0 p2 = Geom::Point3d.new 10, 10, 10 entities = Sketchup.active_model.entities radius = p2.distance(p1) dtheta = dphi = 360.0 / 16 -90.step(90, dtheta) do |theta| 0.step(360, dphi) do |phi| group = entities.add_group pts = [] x = radius * Math::cos(theta.degrees) * Math::cos(phi.degrees) y = radius * Math::cos(theta.degrees) * Math::sin(phi.degrees) z = radius

