From 78d4fdf00a62a62dd1e829e16c1dadb9f8618c21 Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Wed, 10 Sep 2025 12:33:31 +0530 Subject: [PATCH] Final change to ellipse logic. --- steps/src/drawUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/steps/src/drawUtils.js b/steps/src/drawUtils.js index 076c1f4..da41af6 100644 --- a/steps/src/drawUtils.js +++ b/steps/src/drawUtils.js @@ -613,6 +613,7 @@ export function drawCovarianceEllipse( // Only draw the ellipse for tracks that are not stationary. if (isStationary) return; const [radiusA, radiusB] = radii; + const angledegrees = 90 + angle; p.push(); p.noFill(); p.stroke(255, 0, 0, 150); @@ -621,7 +622,7 @@ export function drawCovarianceEllipse( position[0] * plotScales.plotScaleX, position[1] * plotScales.plotScaleY ); - p.rotate(angle); + p.rotate(p.radians(angledegrees)); p.ellipse(0,0, radiusA * 2 * plotScales.plotScaleX, // multiplied by 2 because ellipse function radiusB * 2 * plotScales.plotScaleY // in p5 library expect