-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup documentation, add processo usage
- Loading branch information
1 parent
6f7619b
commit 568aca0
Showing
7 changed files
with
180 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# from https://proceso.cc/examples/creative_coding/ | ||
from proceso import Sketch | ||
|
||
|
||
p5 = Sketch() | ||
p5.describe("A purple circle moving in a figure eight on a light blue background.") | ||
|
||
|
||
def setup(): | ||
p5.create_canvas(400, 400) | ||
p5.background("dodgerblue") | ||
|
||
|
||
def draw(): | ||
p5.translate(p5.width * 0.5, p5.height * 0.5) | ||
x = 80 * p5.cos(0.1 * p5.frame_count) | ||
y = 40 * p5.sin(0.2 * p5.frame_count) | ||
p5.stroke("white") | ||
p5.fill("orchid") | ||
p5.circle(x, y, 20) | ||
if p5.is_mouse_pressed: | ||
p5.background("dodgerblue") | ||
|
||
|
||
p5.run_sketch(setup=setup, draw=draw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# from https://proceso.cc/examples/creative_coding/simple_shapes | ||
# originally adapted from https://p5js.org/examples/hello-p5-simple-shapes.html | ||
from proceso import Sketch | ||
|
||
|
||
p5 = Sketch() | ||
p5.describe("A rectangle, circle, triangle, and flower drawn in pink on a gray background.") | ||
|
||
# Create the canvas | ||
p5.create_canvas(720, 400) | ||
p5.background(200) | ||
|
||
# Set colors | ||
p5.fill(204, 101, 192, 127) | ||
p5.stroke(127, 63, 120) | ||
|
||
# A rectangle | ||
p5.rect(40, 120, 120, 40) | ||
# A circle | ||
p5.circle(240, 240, 80) | ||
# A triangle | ||
p5.triangle(300, 100, 320, 100, 310, 80) | ||
|
||
# A design for a simple flower | ||
p5.translate(580, 200) | ||
p5.no_stroke() | ||
for _ in range(10): | ||
p5.ellipse(0, 30, 20, 80) | ||
p5.rotate(p5.PI / 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters