4
$\begingroup$

In the program I need to create, the user should specify the hull geometry of an aircraft wing and fuselage using cubic bezier polycurves. But to get to m bezier patch surfaces the user would need to introduce 4 * m additional control points. It's not as simple a task as outlining sections in Inkscape.

So the question is whether there is a way to create a bicubic bezier surface having only its edge curves (or maybe any additional curves the user could draw)?

If it isn't possible with bezier curves, is there any way to create a 3d model by specifying only section curves?

If the answer is no, what way would you suggest to create hull geometry (maybe a bit rough) from another 3D model?

$\endgroup$
  • $\begingroup$ Links aren't allowed to be answers by themselves, but here is a link that explains it pretty well, and has simple working source code: blog.demofox.org/2015/07/28/rectangular-bezier-patches $\endgroup$ – Alan Wolfe Feb 16 '16 at 0:37
  • $\begingroup$ @AlanWolfe , that's a great article which explains much, but nevertheless it says about 16 control points for bicubic surface, which I'm trying to evade $\endgroup$ – ProdoElmit Feb 16 '16 at 10:43
  • $\begingroup$ Ah, sorry for missing that part $\endgroup$ – Alan Wolfe Feb 16 '16 at 14:25
3
$\begingroup$

Yes, its pretty standard stuff. Most 3D applications our there can do this. Since the nomenclature of 3d applications is not standardized, the tool has different names in different applications: Loft (Maya, 3DSMax), Blend (Creo, Catia...) and so on.

Blend

Image 1: Blend between 3 curves, not closed but same principle applies. Open curves are easier as they clearly define the boundary conditions. (software used is Creo because that's what I had open)

You usually want the first edge be from a surface edge because otherwise you will lose the tangency info. But nothing prevents you from using a natural tangent direction, you just lose control. Also you need to pay attention to how you intend the curves to connect (what point connects to what point).

Personally I prefer drawing the hull or using some of the network based tools. This way allow you to specify control curves in 2 directions, thus giving control of what to connect where and how it should work mid run.

Image 2

Image 2: Curve network.

There are many ways to do this, infinite ways in fact. Also if you want to be compatible with other mainstream CAD apps use NURBS instead of beziers than its easier for you to write a exporter/importer if your data set is rich enough. Beziers are just special cases of NURBS after all so your code itself should not need to change all that much (fitting also gets easier).

What you do is simply fit a curve trough your points in the second direction this will then give you the corresponding hull in the other direction. In your case you could just make a Bezier patch for each segment and then try to deduce a natural tangent direction.

One way

Like I said theres a infinite ways of constructing these, you have an artistic freedom of doing whatever you see fit it's a over constrained problem. One way of constructing this would be to have a patch for each consecutive cross section. This is nice and tidy as it generalizes works well with an arbitrary number of cross sections.

enter image description here

Image 3: Example of deriving one row for 2 consecutive bezier spans.

First recognize there are 3 cases (ill cover 2):

  1. Free edges,
  2. Internal edges,
  3. External constraint.

I'll cover 1 and 2. First the Internal edge as its simple you want it to be smooth so the tangent length and direction in both patches must match. If that's not true then its not sufficiently continuous. You could simply take that this is the furthest point from the surrounding patches control points and due to mean value theorem it should have a tangent direction perpendicular to these (Line A-C is parallel with D-E). The tangent length should be about 1/3 of the length of the distance to the adjoining vertices (A-B or A-C, in this case the shorter of the spans. It could be longer or average. though that could pose problems). Obviously if you have more spans just repeat for one span forward and after for more internal spans if needed.

For free edges find the point on the perpendicular line that is as far from the point as half distance between the points (length B-D is equal to length (A-B)/2 and length B-E is equal to length (B-D)/2). The free tangent points towards this point. The length of the tangent is as long as one third of corresponding point difference (length (A-B)/3 and (B-C)/3). Obviously the distances and points could be arbitrary but these are somewhat natural.

Repeat for next point sequence in line and next and next. You end up with 2 spans that means 2 times 16 points. There are other ways but this is relatively easy to convert into a visual form without going into deeper maths. But this is pretty well known math you can find many ways to form these by searching in literature.

$\endgroup$
  • $\begingroup$ thank you. Do I understand you correctly, that in my case using NURBS the user could first specify points on surface, and then fine-tune the surface by fine-tuning section curves? And I still cannot get how I can make Bezier (or NURBS) patch with control points and knots only on edges. Can you show your second image with control points and edges? $\endgroup$ – ProdoElmit Feb 16 '16 at 16:43
  • $\begingroup$ @morodeer theres are infinite ways of doing this. But i was drawing a image for you allready just dont have time to complete it $\endgroup$ – joojaa Feb 16 '16 at 17:19
  • $\begingroup$ I think, I understood almost everything: should I use the same algorithm for mid-points? PS: I think there are some mistakes in points and lengths, but image makes it clear. $\endgroup$ – ProdoElmit Feb 16 '16 at 18:40
  • $\begingroup$ @morodeer yes same algo works fine $\endgroup$ – joojaa Feb 16 '16 at 19:00
  • $\begingroup$ ok, and the algorithm you described looks more like blending between 3 curves, but not as interpolating between curve network, right? Do you know equally elegant way to interpolate mid-points in case of curve network? $\endgroup$ – ProdoElmit Feb 16 '16 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.