前提・実現したいこと
processingで原点を中心として球が回転し、その球の周りを別の球が回転するプログラムを書きたいのですがP3Dにしてsphere()を使っているのに球になりません。
球にする方法、原因わかる方教えてほしいです。
該当のソースコード
float s1=1; float s2=5; float a1=0; float a2=0; void setup() { size(1000, 1000,P3D); background(195,0,16); } void draw() { background(0); translate(width/2, height/2); one(); two(); a1+=s1; a2+=s2; } void one() { noStroke(); rotate(frameCount*PI/180.0); translate(300,0,0); sphere(50); } void two() { noStroke(); translate(30, 0); rotate((a2-a1)*PI/180.0); translate(300,0); sphere(10); }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/06/19 08:06