🧪 Version 0.2.2 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for rotate

Rotate around the current origin. This is part of the reference section.

Purpose

Change the transform matrix such that any drawing afterwards is rotated around the current origin clock-wise.

Snippet

Rotate 90 degrees around the x coordinate of 50 and y coordinate of 100.
sketch.set_angle_mode('degrees')
sketch.translate(50, 100)
sketch.rotate(90)

Parameters

  • angle: The angle by which to rotate.

Examples

Availability

Available on all platforms.

See also