-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extrusions - add depth to shape #15
Comments
Add a 👍 reaction to this issue if you would like to see this feature added. Do not add +1 comments — They will be deleted. No, Zdog does not currently support extrusions. This could be a good add-on feature |
I’ve been looking into this. Any thoughts on how curved faces could be handled? One implementation could use polygonal triangulation, but that seems out of sync with Zdog’s philosophy.
I wonder if there's a way to fake it like Cylinder cleverly renders a stroke. Finding a solution here would probably cover #25 as well. |
In my head, a Zdog extrusion would take a naive approach and extrude shapes point-by-point. This would cover angular polygons, but not curved faces. Zdog is not well-suited for for curved faces. I do know that finding contours on bezier paths is mathematically possible, but its over my head. It involves calculus and derivatives. If anyone with proper calc skills wants to help here, that'd be fantastic. |
Bezier extrusion could be done point by point. For example, in the Love2D engine, Bezier curves are not graphics primitives but are paths (polygons) constructed from control points (n-degree). The curve is "rendered" by subdividing (De Casteljau) it into segments by a given granularity. Follow links to see the implementation. |
I created a shape extrusion proof-of-concept using the react-zdog bindings: https://ryanrossiter.com/shape-extrusion-zdog/ (repo) It's accomplished by stacking shapes on top of each other in a group, so fairly naive but it's a start! |
发自我的iPhone
…------------------ Original ------------------
From: ryanrossiter <notifications@github.com>
Date: Fri,Jul 26,2019 8:37 AM
To: metafizzy/zdog <zdog@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [metafizzy/zdog] Extrusions - add depth to shape (#15)
I created a shape extrusion proof-of-concept using the react-zdog bindings: https://ryanrossiter.com/shape-extrusion-zdog/
It's accomplished by stacking shapes on top of each other in a group, so fairly naive but it's a start!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Is there a way to add depth to a custom shape like there is with the box? Would love this!
I have drawn out my shape in 2D. I have tried cloning in to z space and joining up points but there seems to be some buggy seethrough faces behaviour with this method.
https://codepen.io/xadz/pen/BeObVO
The text was updated successfully, but these errors were encountered: