Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pen Ellipse Animation
- sly_i
-
13 posts
Pen Ellipse Animation
Hi All,
I playing around with pen ellipse animation but im getting very poor performance vs clone animation.
Any suggestions on how to improve pen animations speed?
Clone sample: https://scratch.mit.edu/projects/795723574/
Pen sample: https://scratch.mit.edu/projects/796299161/
Thanks
slyi
I playing around with pen ellipse animation but im getting very poor performance vs clone animation.
Any suggestions on how to improve pen animations speed?
Clone sample: https://scratch.mit.edu/projects/795723574/
Pen sample: https://scratch.mit.edu/projects/796299161/
Thanks
slyi
- Spentine
-
1000+ posts
Pen Ellipse Animation
The way to improve the pen animation's speed is to not use bresenham's algorithm, and instead use sin() and cos() each scaled by a factor.
- sly_i
-
13 posts
Pen Ellipse Animation
Thanks Spentine. I never knew, there was so much variety of methods for ellipse drawing then i found The way to improve the pen animation's speed is to not use bresenham's algorithm, and instead use sin() and cos() each scaled by a factor.https://scratch.mit.edu/studios/29609673/
Using your suggestion I tried a few scaled sin and cos with much improved performance
1. Uses GoTo XY https://scratch.mit.edu/projects/796804017/
2. Uses Move and Direction https://scratch.mit.edu/projects/796612453/
- Discussion Forums
- » Help with Scripts
-
» Pen Ellipse Animation