Vispy를 사용하여 큐브를 3 차원 (롤, 피치, 요)으로 어떻게 회전합니까?Vispy를 사용하여 3 차원에서 큐브를 회전하는 방법
큐브를 두 치수로 회전하는 예가 here이지만 세 번째 차원에서 회전하는 방법을 잘 모르겠습니다.
on_timer()
메서드를 수정해야한다고 생각합니다. 나는에서 변경 시도 :
def on_timer(self, event):
self.gamma += .5
self.theta += .5
self.phi += .5
self.model = np.dot(
rotate(self.gamma, (1, 0, 0)),
np.dot(rotate(self.theta, (0, 1, 0)),
rotate(self.phi, (0, 0, 1))),
)
self.program['u_model'] = self.model
self.update()
만 세 번째 차원은 두 번째를 복제 할 것 같다 :
def on_timer(self, event):
self.theta += .5
self.phi += .5
self.model = np.dot(rotate(self.theta, (0, 1, 0)),
rotate(self.phi, (0, 0, 1)))
self.program['u_model'] = self.model
self.update()
에. 내가 도대체 뭘 잘못하고있는 겁니까?