Processing P3D Animation leaving artifacts behind

痴心易碎 提交于 2020-01-25 06:43:09

问题


I am trying to make a spinning cube in Processing's P3D with this code:

int sizes = 500;
int rotation = 0;

void setup() {
  size(500, 500, P3D);
}

void draw() {
  lights();
  translate(sizes/2, sizes/2, 0);
  rotateY(rotation * (PI/180));
  rotateX(rotation * (PI/180));
  background(0);
  box(sizes/2);
  rotation = (rotation + 1);
}

When I run it the cube does spin as I wanted, but there are strange 'artifacts' (for lack of a better name) left behind its edges.

What causes this issue, and can it be solved?

来源:https://stackoverflow.com/questions/58881772/processing-p3d-animation-leaving-artifacts-behind

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!