我told由三個不同的人,這是旋轉的橢圓形的正確方法: // Get current position on the elliptical path.
var x = Math.cos(this.timer.delta() * this.speed) * (this.pathWidth/2);
var y = Math.sin(this.timer.delta() * this.speed)
這是一個來自我正在JavaScript中處理的原子動畫的靜態幀,其模型爲this image。 這裏是用來確定基於時間在其軌道上的電子的位置代碼: // Get position along elliptical path.
var x = Math.cos(this.timer.delta() * this.speed) * (this.pathWidth/2);
var y = Math.