processing / processing/processing4

Stroke is shaking when rotates

Open
#1,481 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Most appropriate sub-area of Processing 4?

Other (specify if possible)

Processing version

4.5.2

Operating system

windows

Bug description

Stroke is shaking when rotates. Only stroke does that, not the filled shape itself.

void draw(){
noFill();
stroke(0, 150, 255); // Blue color
strokeWeight(4);
rotate(radians(angle));
arc(0, 0, 150, 150, 0, PI + HALF_PI);
}

Steps to reproduce this
  1. set frameRate to 60

  2. run code:

void draw(){
noFill();
stroke(0, 150, 255); // Blue color
strokeWeight(4);
rotate(radians(angle));
arc(x, y, 150, 150, 0, PI + HALF_PI);
}

OR

void draw(){
noFill();
stroke(0, 150, 255); // Blue color
strokeWeight(4);
//rotate(radians(angle));
arc(x, y, 150, 150, radians(angle), PI + HALF_PI + radians(angle));
}

  1. observe shaking of the rotating arc
snippet


float angle = 0;

void setup() {
  size(400, 200);
  frameRate(60);
}

void draw() {
  background(30); 
  
  pushMatrix();
  translate(width/2, height/2); 
  
  noFill();
  stroke(0, 150, 255); 
  strokeWeight(4);
  rotate(radians(angle));
  arc(0, 0, 150, 150, 0, PI + HALF_PI);
  
  popMatrix();
  
  angle += 5;
}
Additional context

No response

Would you like to work on the issue?

No, I’m just reporting the issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided setup() and draw() snippets in Processing 4.5.2 on Windows at frameRate 60, then compare the rotating arc with and without rotate(). Reproduce the stroke shaking while the filled shape remains stable. Done means the rotating arc renders without visible stroke shaking in the supplied examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.