+6 07 553 86 86 arazin@utm.my

2D NURBS-based Geometry Explorer

Interactive tool · Isogeometric analysis · NURBS

2D NURBS-based Geometry Explorer

About this tool

Drag the control points and change the weights of a NURBS patch, and see why a few numbers describe a circle, an annulus or a fan blade exactly. Add control points by knot insertion or degree elevation without moving the shape, then switch to a B-spline, a finite element mesh or a meshfree node cloud and measure what is lost. This is the geometry behind our N-RPIM and NDM methods.

Alatan interaktif · Isogeometric analysis · NURBS

2D NURBS-based Geometry Explorer

Tentang alatan ini

Seret control points dan ubah weight bagi satu patch NURBS, dan lihat mengapa beberapa nombor sahaja dapat memerihalkan bulatan, anulus atau bilah kipas secara exact. Tambah control points melalui knot insertion atau degree elevation tanpa menggerakkan bentuk, kemudian tukar kepada B-spline, mesh finite element atau awan nod meshfree dan ukur apa yang hilang. Inilah geometri di sebalik kaedah N-RPIM dan NDM kami.

Loading the interactive tool…Memuatkan alatan interaktif…

How a NURBS patch describes a domain

A NURBS patch maps the unit square of parameters (ξ, η) onto the physical domain. Every point is a weighted average of the control points Pij:

x(ξ, η) = Σi Σj Rij(ξ, η) Pij,    Rij = Ni,p(ξ) Mj,q(η) wij / Σk Σl Nk,p(ξ) Ml,q(η) wkl

Four ingredients fix the shape, and the tool lets you change each of them:

  • Control points Pij. They form the control net. Apart from the corners of an open knot vector, they do not lie on the shape; they pull it, as magnets would.
  • Weights wij. A larger weight pulls the shape towards its control point. With every weight equal, the denominator is 1 and the patch is an ordinary polynomial B-spline.
  • Knot vectors Ξ = {ξ1, …, ξn+p+1} and H. Non-decreasing parameter values. The distinct knots cut the parameter square into knot spans, which are the elements of isogeometric analysis. A knot repeated m times lowers the continuity there to Cp−m; at m = p the patch may have a corner.
  • Degrees p and q. The B-spline basis Ni,p comes from the Cox–de Boor recursion, Ni,0 = 1 on [ξi, ξi+1), Ni,p = (ξ − ξi)/(ξi+p − ξi) Ni,p−1 + (ξi+p+1 − ξ)/(ξi+p+1 − ξi+1) Ni+1,p−1.

The basis functions are never negative, sum to 1 everywhere, and Ni,p is non-zero only on [ξi, ξi+p+1], at most p + 1 spans. So a control point moves only the part of the patch shaded around it (local support), and the patch stays inside the convex hull of its control net when the weights are positive.

Why rational? A polynomial cannot trace a circle. A NURBS curve is the shadow of a polynomial B-spline in the homogeneous space (wx, wy, w), projected back by dividing by w, and that projection produces the conic sections exactly. A circular arc of angle θ needs three control points: the two ends, with w = 1, and the intersection of the end tangents, with w = cos(θ/2) (0.7071 for 90°). Set that weight to 1 and the “circle” is off by 6% in radius.

Circle arc, 90°: P0 = (R, 0), w = 1  ·  P1 = (R, R), w = cos 45°  ·  P2 = (0, R), w = 1   ⇒  |x(ξ)| = R for every ξ

Refinement without changing the shape. Knot insertion (h-refinement) and degree elevation (p-refinement) enlarge the space of B-splines that the homogeneous curve belongs to. The curve is already in the larger space, so new control points exist that reproduce it exactly. Doing p first and then h (k-refinement) gives higher continuity across the new knots than h first and then p. Refinement never needs the CAD model again, which is the practical core of isogeometric analysis.

Compared with finite elements. An isoparametric Lagrange mesh puts its nodes on the true boundary and interpolates between them, with straight edges (Q4) or parabolic edges (Q9). The geometry error falls with the element size h, roughly as h² for Q4 and h³ for Q9 in the radius of a circular edge, but it never reaches zero. A NURBS patch is exact on its coarsest mesh, and refinement only adds unknowns.

Meshfree views. A meshfree method needs nodes, not elements, but it still needs the geometry. In the EFG-type view the nodes are stored as points in x, y: the boundary is then the polygon through the boundary nodes (as in a background mesh of straight-sided integration cells), and a circular support d = αh around a node near a hole or a re-entrant corner can take in nodes on the other side, which are close in x, y but not connected through the material. In the N-RPIM / NDM view the nodes sit on a lattice in the NURBS parameter space and are mapped by the NURBS, so the geometry stays exact and a support is a circle in (ξ, η): in x, y it bends with the domain, cannot cross a hole and stops at C⁰ knot lines (Mokhtaram et al. 2022; Rasin et al. 2025). The basis plot then shows 1D MLS shape functions along one line of nodes (quadratic basis, weight e−(r/0.3d)²), which sum to 1 but do not interpolate.

A valid map. The Jacobian determinant det J = xξ yη − xη yξ must stay positive. Where it reaches zero the map has a singular point (the corners of the one-patch disc, the doubled corner of the C¹ plate with a hole); where it changes sign the patch folds over itself and cannot be analysed.

Your own geometry. Import reads a patch from a plain text file in the format RZNURBS 1, and Export writes the current patch in the same format, so a geometry drawn here can be read by the next tools, or by your own code. Template downloads an annotated example.

RZNURBS 1
NAME Quarter annulus
DEGREE 1 2             # p (along ξ), q (along η)
KNOTS_XI 0 0 1 1       # open: end values repeated p + 1 times
KNOTS_ETA 0 0 0 1 1 1
CONTROL_POINTS 2 3     # nξ nη, then rows “i j x y w”
0 0 0.3 0 1
0 1 0.3 0.3 0.70710678
…
END

Indices start at 0; nξ = (number of knots in ξ) − p − 1. Rows may also be written as “x y w” (or “x y”, with w = 1), read in order with i running fastest. Text after # is ignored. Up to 60 control points per direction and degree 6.

Editing the knot vectors. Type a knot vector and apply it. If it contains the old one, the new control points come from exact knot insertion and the shape does not move. With the same number of knots but different values, the control points stay and the shape changes. With fewer or other knots, the current shape is fitted by least squares in homogeneous coordinates, with the four corner control rows kept. Delete removes one occurrence of a knot in the same way. The note always reports the largest shift of the shape, so you can see whether a knot was really needed.

Choices in this tool: refinement computes the new control points by an exact change of basis in homogeneous coordinates (collocation at the Greville points of the new basis, equivalent to Boehm’s knot insertion and to Bézier-based degree elevation, to round-off); the B-spline view keeps the same control points and sets every weight to 1; finite element nodes are spaced evenly in the parameter within each knot span; the area is computed on the boundary by Green’s theorem with Gauss quadrature, the radius error from 400 points per arc, det J from 9 × 9 points per span. The tool shows one patch only: multi-patch geometries, trimmed surfaces and local refinement (T-splines, hierarchical or LR B-splines) are not covered.

Things to try
  1. Open Quarter annulus, minimal and select a middle control point (hollow square, w = 0.7071). Move the weight slider: at w = 1 the arcs become parabola-like and the radius error jumps from about 10−16 to 6%. A larger weight pulls the arc towards the control point.
  2. Switch the representation to B-spline. The radius error is 6.1% and the area 6.1% too large. Now h-refine η again and again: 0.31%, 0.069%, 0.0068%, … The polynomial patch converges to the circle but never reaches it.
  3. Back on NURBS, press p-elevate ξ and then h-refine η. Compare the knot vectors and control net with Quarter annulus (Rasin et al. 2025): they are identical. The same shape has many NURBS descriptions.
  4. Open the Disc and choose the Lagrange FE mesh, linear with 1 element per span: the “disc” is a square with 36% less area. Increase the elements per span and watch the radius error fall about 4 times per halving; with Q9 it falls about 8 times.
  5. Colour the disc by det J: it falls to zero at the four corners of the parameter square. Then compare the two plates with a hole: the C¹ form of Hughes et al. collapses the corner (4, 4), while the C⁰ form of our papers keeps it regular.
  6. Open the Semicircular arch and drag the control point at the crown upwards: a kink appears on the repeated knot ξ = 0.5. On the Free-form patch, insert ξ = 0.5 three times (multiplicity 3 = p) and drag a control point on the new bold line: the patch can now have a sharp corner there.
  7. On the Free-form patch, drag an interior control point: the whole patch moves, because a single Bézier patch has one span. Press h-refine ξ and h-refine η three times each (8 × 8 = 64 spans) and select a control point: its shaded support now covers at most (p + 1)² = 16 spans.
  8. Drag a control point across the boundary until the det J chip turns red: the map folds. Colour by det J to see where, then press Undo.
  9. Look at the basis-function plot while you change a weight: the dashed B-spline functions Ni never move, the solid NURBS functions Ri do, and both always sum to 1 (hover to read the sum).
  10. Type the knot vector η of Quarter annulus (Rasin et al. 2025) as 0 0 0 1 1 1 and apply: the shape does not move, because one quadratic span already holds a 90° arc. Then open Plate with a hole (N-RPIM, NDM) and delete the knot η = 0.5: the corner (4, 4) cannot be kept with C¹ continuity, and the fit moves the shape by about 11% of its size.
  11. Compare the two cellular-beam unit cells: the web post between two half openings and the cell centred on one opening describe the same beam with the same area, 0.517. The second is still one patch, with a seam where ξ = 0 meets ξ = 1.
  12. Export a shape you have edited, open the text file, change a weight and import it again.
  13. Open the Plate with a hole and choose Meshfree nodes in x, y: the node on the hole at θ = 0 has a support that reaches across the hole (red lines). Switch to Meshfree nodes in ξ, η: the same node keeps only nodes on its own side, the support bends around the hole, and it stops at the C⁰ line on the diagonal.
Bagaimana patch NURBS memerihalkan domain

Patch NURBS memetakan segi empat sama unit bagi parameter (ξ, η) kepada domain fizikal. Setiap titik ialah purata berpemberat bagi control points Pij:

x(ξ, η) = Σi Σj Rij(ξ, η) Pij,    Rij = Ni,p(ξ) Mj,q(η) wij / Σk Σl Nk,p(ξ) Ml,q(η) wkl

Empat bahan menentukan bentuk, dan tool ini membolehkan anda mengubah setiap satunya:

  • Control points Pij. Ia membentuk control net. Selain bucu bagi open knot vector, ia tidak terletak pada bentuk; ia menarik bentuk itu, seperti magnet.
  • Weight wij. Weight yang lebih besar menarik bentuk ke arah control point-nya. Jika semua weight sama, penyebut bernilai 1 dan patch menjadi B-spline polinomial biasa.
  • Knot vectors Ξ = {ξ1, …, ξn+p+1} dan H. Nilai parameter yang tidak menurun. Knot yang berbeza memotong segi empat parameter kepada knot spans, iaitu element dalam isogeometric analysis. Knot yang diulang m kali menurunkan keselanjaran di situ kepada Cp−m; pada m = p patch boleh mempunyai bucu.
  • Darjah p dan q. Basis B-spline Ni,p diperoleh daripada rekursi Cox–de Boor, Ni,0 = 1 pada [ξi, ξi+1), Ni,p = (ξ − ξi)/(ξi+p − ξi) Ni,p−1 + (ξi+p+1 − ξ)/(ξi+p+1 − ξi+1) Ni+1,p−1.

Basis functions tidak pernah negatif, jumlahnya 1 di semua tempat, dan Ni,p bukan sifar hanya pada [ξi, ξi+p+1], paling banyak p + 1 span. Jadi satu control point hanya menggerakkan bahagian patch yang berlorek di sekelilingnya (local support), dan patch kekal di dalam convex hull control net-nya apabila semua weight positif.

Mengapa rasional? Polinomial tidak dapat mengikut bulatan. Lengkung NURBS ialah bayang bagi B-spline polinomial dalam ruang homogen (wx, wy, w), yang diunjurkan kembali dengan membahagi dengan w, dan unjuran itu menghasilkan keratan kon secara exact. Lengkok bulatan bersudut θ memerlukan tiga control point: dua hujung, dengan w = 1, dan persilangan tangen di hujung, dengan w = cos(θ/2) (0.7071 untuk 90°). Tetapkan weight itu kepada 1 dan “bulatan” itu tersasar 6% pada jejarinya.

Lengkok bulatan, 90°: P0 = (R, 0), w = 1  ·  P1 = (R, R), w = cos 45°  ·  P2 = (0, R), w = 1   ⇒  |x(ξ)| = R bagi setiap ξ

Refinement tanpa mengubah bentuk. Knot insertion (h-refinement) dan degree elevation (p-refinement) membesarkan ruang B-spline yang mengandungi lengkung homogen itu. Lengkung tersebut sudah berada dalam ruang yang lebih besar, jadi wujud control points baharu yang menghasilkannya semula secara exact. Melakukan p dahulu kemudian h (k-refinement) memberi keselanjaran yang lebih tinggi merentasi knot baharu berbanding h dahulu kemudian p. Refinement tidak memerlukan model CAD lagi, dan inilah teras praktikal isogeometric analysis.

Berbanding finite element. Mesh Lagrange isoparametric meletakkan nodnya pada sempadan sebenar dan menginterpolasi di antaranya, dengan sisi lurus (Q4) atau sisi parabola (Q9). Ralat geometri berkurang mengikut saiz element h, kira-kira h² bagi Q4 dan h³ bagi Q9 pada jejari sisi bulat, tetapi tidak pernah mencapai sifar. Patch NURBS sudah exact pada mesh paling kasar, dan refinement hanya menambah bilangan anu.

Paparan meshfree. Kaedah meshfree memerlukan nod, bukan element, tetapi ia tetap memerlukan geometri. Dalam paparan jenis EFG, nod disimpan sebagai titik dalam x, y: sempadan ialah poligon melalui nod sempadan (seperti background mesh dengan cell kamiran bersisi lurus), dan support bulat d = αh di sekeliling nod berhampiran lubang atau sudut masuk boleh merangkumi nod di sebelah sana, yang dekat dalam x, y tetapi tidak bersambung melalui bahan. Dalam paparan N-RPIM / NDM, nod terletak pada kekisi dalam ruang parameter NURBS dan dipetakan oleh NURBS, jadi geometri kekal exact dan support ialah bulatan dalam (ξ, η): dalam x, y ia melengkung mengikut domain, tidak dapat merentasi lubang dan berhenti pada knot lines C⁰ (Mokhtaram et al. 2022; Rasin et al. 2025). Plot basis kemudian menunjukkan shape functions MLS 1D sepanjang satu garis nod (basis kuadratik, weight e−(r/0.3d)²), yang berjumlah 1 tetapi tidak menginterpolasi.

Pemetaan yang sah. Penentu Jacobian det J = xξ yη − xη yξ mesti kekal positif. Jika ia mencapai sifar, pemetaan mempunyai titik singular (bucu cakera satu patch, bucu berganda bagi plat berlubang C¹); jika ia bertukar tanda, patch terlipat dan tidak boleh dianalisis.

Geometri anda sendiri. Import membaca patch daripada fail teks biasa dalam format RZNURBS 1, dan Export menulis patch semasa dalam format yang sama, jadi geometri yang dilukis di sini boleh dibaca oleh tool seterusnya, atau oleh kod anda sendiri. Templat memuat turun contoh beranotasi.

RZNURBS 1
NAME Quarter annulus
DEGREE 1 2             # p (sepanjang ξ), q (sepanjang η)
KNOTS_XI 0 0 1 1       # open: nilai hujung diulang p + 1 kali
KNOTS_ETA 0 0 0 1 1 1
CONTROL_POINTS 2 3     # nξ nη, kemudian baris “i j x y w”
0 0 0.3 0 1
0 1 0.3 0.3 0.70710678
…
END

Indeks bermula dari 0; nξ = (bilangan knot dalam ξ) − p − 1. Baris juga boleh ditulis sebagai “x y w” (atau “x y”, dengan w = 1), dibaca mengikut turutan dengan i berubah paling cepat. Teks selepas # diabaikan. Sehingga 60 control points setiap arah dan darjah 6.

Mengedit knot vectors. Taip knot vector dan tekan Guna. Jika ia mengandungi knot vector lama, control points baharu diperoleh melalui knot insertion secara exact dan bentuk tidak bergerak. Dengan bilangan knot yang sama tetapi nilai berbeza, control points dikekalkan dan bentuk berubah. Dengan knot yang lebih sedikit atau berlainan, bentuk semasa di-fit secara least squares dalam koordinat homogen, dengan baris control point di bucu dikekalkan. Padam membuang satu kemunculan knot dengan cara yang sama. Nota sentiasa melaporkan anjakan terbesar bentuk, jadi anda dapat lihat sama ada knot itu benar-benar diperlukan.

Pilihan dalam tool ini: refinement mengira control points baharu melalui penukaran basis secara exact dalam koordinat homogen (collocation pada Greville points bagi basis baharu, setara dengan knot insertion Boehm dan degree elevation berasaskan Bézier, hingga round-off); paparan B-spline mengekalkan control points yang sama dan menetapkan semua weight = 1; nod finite element dijarakkan sekata dalam parameter bagi setiap knot span; luas dikira pada sempadan melalui teorem Green dengan Gauss quadrature, ralat jejari daripada 400 titik setiap lengkok, det J daripada 9 × 9 titik setiap span. Tool ini hanya menunjukkan satu patch: geometri multi-patch, trimmed surfaces dan local refinement (T-splines, hierarchical atau LR B-splines) tidak diliputi.

Cubaan untuk anda
  1. Buka Suku anulus, minimum dan pilih control point tengah (segi empat berongga, w = 0.7071). Gerakkan slider weight: pada w = 1 lengkok menjadi seperti parabola dan ralat jejari melonjak daripada kira-kira 10−16 kepada 6%. Weight yang lebih besar menarik lengkok ke arah control point.
  2. Tukar perwakilan kepada B-spline. Ralat jejari ialah 6.1% dan luas 6.1% terlebih. Sekarang h-refine η berulang kali: 0.31%, 0.069%, 0.0068%, … Patch polinomial converge kepada bulatan tetapi tidak pernah mencapainya.
  3. Kembali kepada NURBS, tekan p-elevate ξ kemudian h-refine η. Bandingkan knot vectors dan control net dengan Suku anulus (Rasin et al. 2025): kedua-duanya sama. Satu bentuk mempunyai banyak perihalan NURBS.
  4. Buka Cakera dan pilih Mesh FE Lagrange, linear dengan 1 element setiap span: “cakera” itu menjadi segi empat sama dengan luas 36% kurang. Tambah element setiap span dan perhatikan ralat jejari berkurang kira-kira 4 kali setiap kali saiz element diseparuhkan; dengan Q9 ia berkurang kira-kira 8 kali.
  5. Warnakan cakera mengikut det J: nilainya jatuh kepada sifar pada empat bucu segi empat parameter. Kemudian bandingkan dua plat berlubang: bentuk C¹ Hughes et al. meruntuhkan bucu (4, 4), manakala bentuk C⁰ dalam paper kami mengekalkannya sebagai titik biasa.
  6. Buka Gerbang separuh bulatan dan seret control point di puncak ke atas: satu kink muncul pada knot berulang ξ = 0.5. Pada Patch bentuk bebas, sisip ξ = 0.5 tiga kali (multiplicity 3 = p) dan seret control point pada garis tebal yang baharu: patch kini boleh berbucu tajam di situ.
  7. Pada Patch bentuk bebas, seret satu control point dalaman: seluruh patch bergerak, kerana satu patch Bézier hanya mempunyai satu span. Tekan h-refine ξ dan h-refine η tiga kali setiap satu (8 × 8 = 64 span) dan pilih satu control point: support berloreknya kini meliputi paling banyak (p + 1)² = 16 span.
  8. Seret satu control point melintasi sempadan sehingga chip det J menjadi merah: pemetaan terlipat. Warnakan mengikut det J untuk melihat di mana, kemudian tekan Undo.
  9. Perhatikan plot basis functions semasa anda mengubah weight: fungsi B-spline Ni (putus-putus) tidak pernah bergerak, fungsi NURBS Ri (padu) bergerak, dan kedua-duanya sentiasa berjumlah 1 (halakan tetikus untuk membaca jumlahnya).
  10. Taip knot vector η bagi Suku anulus (Rasin et al. 2025) sebagai 0 0 0 1 1 1 dan tekan Guna: bentuk tidak bergerak, kerana satu span kuadratik sudah memadai untuk lengkok 90°. Kemudian buka Plat berlubang (N-RPIM, NDM) dan padam knot η = 0.5: bucu (4, 4) tidak dapat dikekalkan dengan keselanjaran C¹, dan fit menganjakkan bentuk kira-kira 11% daripada saiznya.
  11. Bandingkan dua unit cell cellular beam: web post di antara dua separuh bukaan dan cell yang berpusat pada satu bukaan memerihalkan rasuk yang sama dengan luas yang sama, 0.517. Yang kedua tetap satu patch, dengan seam di tempat ξ = 0 bertemu ξ = 1.
  12. Export bentuk yang telah anda ubah, buka fail teksnya, ubah satu weight dan import semula.
  13. Buka Plat berlubang dan pilih Nod meshfree dalam x, y: support bagi nod pada lubang di θ = 0 merentasi lubang (garis merah). Tukar kepada Nod meshfree dalam ξ, η: nod yang sama hanya mengekalkan nod di sebelahnya sendiri, support melengkung mengelilingi lubang, dan berhenti pada garis C⁰ di pepenjuru.

Related reading

Runs entirely in your browser; nothing is sent anywhere. Source code: github.com/RazinUTM/rz-tools. Spotted a bug or have an idea for a tool? Email arazin@utm.my.

© 2026 Universiti Teknologi Malaysia – All Rights Reserved. Copyright filing no. LY2026E09924 (23 October 2026). Licensing enquiries are handled by the UTM Innovation and Commercialisation Centre (ICC).

Bacaan berkaitan

Berjalan sepenuhnya dalam pelayar anda; tiada data dihantar ke mana-mana. Kod sumber: github.com/RazinUTM/rz-tools. Jumpa pepijat atau ada idea untuk alatan baharu? E-mel arazin@utm.my.

© 2026 Universiti Teknologi Malaysia – All Rights Reserved. No. pemfailan hakcipta LY2026E09924 (23 Oktober 2026). Pertanyaan perlesenan diuruskan oleh Pusat Inovasi dan Pengkomersilan (ICC) UTM.