Question
Description and sample
I would like to create a cylinder made up of various layers, then cut parts out from the front view such that the composition of the various layers is revealed.
Thought process
- Figure out how to create cylinders
- Change the circles/ellipses to arcs
- Draw the exposed surfaces as parallellograms
- Draw and connect two arcs per extra layer around the middle cylinder
- Draw more exposed surfaces
1. Figure out how to create cylinders
- drawing cylinders and other shapes
- cylinder within a cylinder
- concentric cylinders (no idea what's happening in this one)
2. Change the circles/ellipses to arcs
I'm already stuck on this part, I found out how to draw elliptical arcs by modifying the answer to this question but I'm not sure how to connect both ends of the arc to the centre of the ellipse to create a fillable shape.
3. Draw the exposed surfaces as parallellograms
For a circle, it's easy to calculate the exact coordinates of an arc spanning some angle, but I'm not sure how I would do it for an ellipse. I was wondering if I could let TikZ do the work of finding the start and end coordinates of the elliptical arc. Once I got those points, I suppose it would be easy to use --
and cycle
to trace out the exposed surfaces.
4. Draw and connect two arcs per extra layer around the middle cylinder
Similar problem to 2. but I'd have to loop over the starting points as well as the end points of both arcs.
5. Draw more exposed surfaces
Same as 3.
What I've tried so far
I've been browsing the TikZ manual but the awkward wording and unintuitive flow kind of threw me off. I've looked up some questions that seemed relevant and tried to re-use the code from their answers, but ultimately I'm just not familiar enough with the framework to get a good grasp of what I should be doing here.
Is there a newbie-friendly way to accomplish this? I think I've seen some 3D samples in the TikZ manual, but I'm not interested in a Z-axis. I'm trying to create a picture in the XY-plane with the Z-axis pointing straight out of the page, if that makes sense.