Revolution 2D spline to 3D surface

2 ビュー (過去 30 日間)
Daan Van Gorp
Daan Van Gorp 2016 年 10 月 4 日
回答済み: Unai San Miguel 2017 年 3 月 16 日
Hi all,
I would like to revolute a 2D spline that I constructed (to describe a train wheel). How do I perform this revolution so the description in 3D remains a analytical (thus spline) expression?
Thank you

回答 (1 件)

Unai San Miguel
Unai San Miguel 2017 年 3 月 16 日
It depends on what you mean by analytical expression. For example, it is not possible to express a circle and thus a revolution surface with polynomial splines and you should use rational splines if you wanted that.
But usually a polynomial spline with enough degrees of freedom can approximate well a circle.
Let su = spmak(knotsu, coefsu) be your 2D (2-valued, 1-variate) spline and size(coefsu) = [2, Nu]. The first component represents the radial coordinate r and the second the axial z.
Let sv = spmak(knotsv, coefsv) be the 2-valued, 1-variate spline approximation to a circle of radius 1 and centered at the origin of coordinates.
A general revolution surface is of the form [r(u) * cos(v), r(u) * sin(v), z(u)]', with the u=u0=const curves being circles of radius r(u0) at z = z(u0), and the v=v0=const curves rotations of the generatrix at angle v0 along the z-axis.
As sv is an approximation of [cos(v), sin(v)]' you can construct the tensor product spline
s = spmak({knotsu, knotsv}, coefs);
with size(coefs) = [3, su.number, sv.number] and the following definitions
coefs(1,:,:) = su.coefs(1,:)' * sv.coefs(1,:); % r(u) * cos(v)
coefs(2,:,:) = su.coefs(1,:)' * sv.coefs(2,:); % r(u) * sin(v)
coefs(3,:,:) = su.coefs(2,:)' * ones(size(sv.coefs(1,:))); % z(u)
taking advantage of the affine-conservation properties of splines.
I don't use rational splines, but in The NURBS Book by Piegl and Tiller this solution with NURBS is explained.

カテゴリ

Help Center および File ExchangeSpline Construction についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by