Trouble exporting P3D via PGraphics recording (OpenGL error 1282) :blobcatsad:
Interactive demo of #shapely’s centroid for the triangle :)
import py5
from shapely import Polygon, Point
def setup():
py5.size(400, 400)
py5.stroke_join(py5.ROUND)
def draw():
py5.background(200)
pts = ((100, 100), (300, 100),
(py5.mouse_x, py5.mouse_y))
xs, ys = zip(*pts)
cx = sum(xs) / len(xs)
cy = sum(ys) / len(ys)
tri = Polygon(pts)
py5.no_fill()
py5.stroke_weight(1)
py5.stroke(0, 200, 0)
py5.shape(Point(cx, cy).buffer(5))
py5.stroke(0, 0, 200)
py5.shape(tri.envelope.buffer(2))
py5.shape(tri.envelope.centroid.buffer(5))
py5.stroke_weight(3)
py5.stroke(0)
py5.shape(tri)
py5.fill(0)
py5.shape(tri.centroid.buffer(2))
py5.run_sketch(block=False)
I have a #CreativeCoding course at Domestika, teaching the first steps of #Python and #py5. The feedback from students always makes me happy!
Check out this work by a student:
https://www.domestika.org/en/projects/1841169-programacion?ttag=a_b_a_villares
And other testimonials:
I have a #CreativeCoding course at Domestika, teaching the first steps of #Python and #py5. The feedback from students always makes me happy!
Check out this work by a student:
https://www.domestika.org/en/projects/1841169-programacion?ttag=a_b_a_villares
And other testimonials:
A library to help use the #Beholder system of webcam detected markers with #p5js
A library to help use the #Beholder system of webcam detected markers with #p5js (made by https://enric.llagostera.com.br/)
This is your friendly reminder that you could be making #PaperObjects with #Python and #py5, you know?
https://github.com/villares/Paper-objects-with-Processing-and-Python/
(Mind you that GitHub images are mostly failing to load here today for some unknown reason)
If you like this, support my work:
https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724
https://liberapay.com/Villares
https://wise.com/pay/me/alexandrev562
#Processing #CreativeCoding
#LGM #LibreGraphicsMeeting 2025 - “The State of #Processing: How We’re Bringing a Creative Coding Icon Back to Life”
https://www.youtube.com/watch?v=ngQwedwFyOY
#Processing4 #CreativeCoding @processing@processing @processingorg@processingorg
Updating my “how install and use #py5” pages, check them out if you want to “… draw and experiment some #CreativeCoding with #Python …”
EN: https://abav.lugaralgum.com/como-instalar-py5/index-EN.html
ES: https://abav.lugaralgum.com/como-instalar-py5/index-ES.html
fit 1 $ spin (saw 0.1 * sign fxy) $ rect 0 1 - rect 0 0.99 >> add;
#punctual #livecoding #creativecoding #videoart