Modelling question - How to bend cylinder to get tube #277
-
How can I create bent tube within mitsuba easily? As an input, I have a curve that I don't know in advace (therefore I can't model it outside mitsuba) but I know that it's bent just slightly (as you can in the picture below) and it start point is always at origin [0,0,0] and end is at [0,0,1]. I was wodering what is the quickest way to come up with such tube within mitusba. I looked around a bit and found out that
Based on the assumptions and observations, I came up with this approach
Given the assumption about Z-orientation and small curvature, I can approximate the tube well enough in this way without significant anomalies. The template itself can be either pre-created mesh or something created in memory. Is there any quicker way in mitsuba to achieve this? Or any other tips (e.g. way to split bend Cylinder shape or compose the bent from small straight pieces in some continuous way) Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe everything you mentioned is correct. However, I'm not completely sure of what you mean by "template of a cylinder". If you're going to try to stitch together an existing mesh model that seems a bit painful and you might as well do it directly in Mitsuba using the mesh manipulation tools.
The tutorial you linked already has similar steps, you can easily adapt it to this use case. Although this is all possible with Mitsuba/Dr.Jit, you might be better off using a different set of tools that are specifically designed for this and then import it into Mitsuba. |
Beta Was this translation helpful? Give feedback.
I believe everything you mentioned is correct.
However, I'm not completely sure of what you mean by "template of a cylinder". If you're going to try to stitch together an existing mesh model that seems a bit painful and you might as well do it directly in Mitsuba using the mesh manipulation tools.
Here's what I would suggest: