I’m a beginner and this is my first post.
I wrote a little sketch which animates simple and more or less complex shapes around the screen.
I’ve been using shape primitives like rect(), ellipse() etc for this, but after reading this PShape Tutorial I want to update my sketch to use the PShape function for all my shapes.
While doing this I came across two questions:
(1)
I’ve started to rebuild the shapes as .svg files in Inkscape.
Is this a reasonable way or is there a better way to approach this?
(2)
Looking for a way to handle multiple shapes in my sketch I’m thinking of following this example: “Examples/Topics/Create Shapes/PolygonPShapeOOP3”
Is this a reasonable way or would you suggest another way when working with .svg?
I use custom shapes all the time. I prefer drawing vectors in CAD-style programs (I use Rhino3D). Illustrator and Inkscape works as well. If you’re comfortable creating in them, then it’s pretty reasonable.
Is this from the Python mode set of examples? I just took a look at it and it’s pretty neat. I think it depends on how you want to use the shapes. I mostly use .svgs and .objs as containers for vertices, where I take the data I take from it and create a custom class that uses it. PShape methods such as .getChild(), getVertexCount(), and .getVertex() come in handy.
@WakeMeAtThree
Nice nickname…my github account is “snooze-function”
Thanks a lot for your response and your suggestions
Sorry for my late reply, I’ve been a few days away from the screen.
I’ll need to find some time to learn some more about .svg files in general.
But at least I found a little time to write a first sketch using .svg files.
If you’d like to take a look, here is a link to the public repo of my first try. (I guess I can put all four shapes into one .svg and use the PShape method getChild() you’ve outlined above to extract single shapes from it!?..need to try this soon) https://github.com/snooze-function/animations/tree/master/svg_test
I’m a beginner…so I really don’t know for sure
…but I think no…
just found this under /Examples, and I’ve been able to run the code without adding a Mode.
At the moment this is just for learning purposes.
I’m currently working through the “Learning Processing” book,
to learn the basic concepts of programming.
As an exercise I wrote a sketch which incorporates what I’ve learned so far.
To make this sketch run more efficient I want to render my shapes using “retained” mode instead of “immediate” mode now.
If you want to take a look at what the shapes do so far, here is link to my repo (not updated to use .svg files yet) On a long term basis I want to use this sketch as a music visualizer which gets controlled separately via a controller and/or to directly react to button pushes of the controller used for the music performance.
I’ll try to find some time to dig into svg files and the things you suggested asap.
Any feedback to repos mentioned above is much appreciated!!