Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change origin #137

Open
I-Am-Umbrella opened this issue Jun 30, 2024 · 3 comments
Open

Change origin #137

I-Am-Umbrella opened this issue Jun 30, 2024 · 3 comments

Comments

@I-Am-Umbrella
Copy link

Add ability to change pen origin to any of the four corners of the paper.

@alexrudd2
Copy link
Owner

My best guess as to what's setting the plot origin is here:

saxi/src/planning.ts

Lines 519 to 524 in 3e9ae84

function constantAccelerationPlan(points: Vec2[], profile: AccelerationProfile): XYMotion {
const dedupedPoints = dedupPoints(points, epsilon);
if (dedupedPoints.length === 1) {
return new XYMotion([new Block(0, 0, 0, dedupedPoints[0], dedupedPoints[0])]);
}
const segments = dedupedPoints.slice(1).map((a, i) => new Segment(dedupedPoints[i], a));

@alexrudd2
Copy link
Owner

Yeah, that guess was totally wrong... but I finally found it!

let curPos = { x: 0, y: 0 };

@alexrudd2
Copy link
Owner

alexrudd2 commented Feb 17, 2025

I added a visualization of the origin in ac8251d It's slightly dull now, since it's always at (0, 0)

Image

However, with a different origin it's more useful. Black for emphasis now, will eventually be back to gray.
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants