sphere() has a stick
in
Programming Questions
•
2 years ago
When the small sphere() was magnified by the scale(), the sphere has a stick.
Processing 1.5.1 and 1.5(MacOS X 10.6)
Is this a bug?
Any avoidance method?
# Processing 1.2.1 had no problem.
Sample code.
I found,
replace
scale(100) and sphere(0.5)
with
scale(1) and sphere(0.5*100)
is one of the solution.
Processing 1.5.1 and 1.5(MacOS X 10.6)
Is this a bug?
Any avoidance method?
# Processing 1.2.1 had no problem.
Sample code.
- float Mx=PI,My=0;
- void setup() {
- size(200, 200, P3D);
- noStroke();
- }
- void draw() {
- background(255);
- translate(width/2, height/2, 0);
- lights();
- rotateX(My);
- rotateY(Mx);
- scale(100);
- pushMatrix();
- translate(0,0,0);
- sphere(0.5);
- popMatrix();
- }
- void mouseDragged(){
- Mx+=(mouseX-pmouseX)/200.;
- My+=-(mouseY-pmouseY)/200.;
- }
I found,
replace
scale(100) and sphere(0.5)
with
scale(1) and sphere(0.5*100)
is one of the solution.
1