You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a personal project that tries to render shapes defined by bezier curves onto the screen. I encountered some problems when trying to implement the bezier_fill part. My original thought was to trianglulate inner part of a shape using ear clipping algorithm, and fill the rest outer part with short bezier curves (two anchors two handles). Like the graph shown below:
However, this method does not work when the inner part of the shape is a self-intersecting polygon. Like the Like the graph shown below:(the blue lines connect all the anchors and the red lines connect all the anchor and the handles)(this shape should look like a ring)
I believe manim has used a different method to implement this. Can someone help me to explain how it can be done?
I have spent hours trying to understand the codes in vectorized_mobject.py and shaders under quadratic_bezier_fill and still could not get a single clue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently working on a personal project that tries to render shapes defined by bezier curves onto the screen. I encountered some problems when trying to implement the bezier_fill part. My original thought was to trianglulate inner part of a shape using ear clipping algorithm, and fill the rest outer part with short bezier curves (two anchors two handles). Like the graph shown below:
However, this method does not work when the inner part of the shape is a self-intersecting polygon. Like the Like the graph shown below:(the blue lines connect all the anchors and the red lines connect all the anchor and the handles)(this shape should look like a ring)
I believe manim has used a different method to implement this. Can someone help me to explain how it can be done?
I have spent hours trying to understand the codes in vectorized_mobject.py and shaders under quadratic_bezier_fill and still could not get a single clue.
Beta Was this translation helpful? Give feedback.
All reactions