~ubuntu-branches/ubuntu/precise/octave-nurbs/precise

« back to all changes in this revision

Viewing changes to inst/democoons.m

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Weber
  • Date: 2011-04-20 21:53:46 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110420215346-mtrs63hlmsh5yuaz
Tags: 1.3.3-1
* New upstream release
* Bump standards version to 3.9.1, no changes needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
% Construction of a bilinearly blended Coons surface
2
 
%
3
 
 
4
 
%  D.M. Spink
5
 
%  Copyright (c) 2000.
6
 
 
7
 
% Boundary curve 1
8
 
pnts = [ 0.0  3.0  4.5  6.5 8.0 10.0;
9
 
         0.0  0.0  0.0  0.0 0.0  0.0; 
10
 
         2.0  2.0  7.0  4.0 7.0  9.0];   
11
 
crv1 = nrbmak(pnts, [0 0 0 1/3 0.5 2/3 1 1 1]);
12
 
 
13
 
% Boundary curve 2
14
 
pnts= [ 0.0  3.0  5.0  8.0 10.0;
15
 
        10.0 10.0 10.0 10.0 10.0;
16
 
        3.0  5.0  8.0  6.0 10.0];
17
 
crv2 = nrbmak(pnts, [0 0 0 1/3 2/3 1 1 1]);
18
 
 
19
 
% Boundary curve 3
20
 
pnts= [ 0.0 0.0 0.0 0.0;
21
 
        0.0 3.0 8.0 10.0;
22
 
        2.0 0.0 5.0 3.0];
23
 
crv3 = nrbmak(pnts, [0 0 0 0.5 1 1 1]);
24
 
 
25
 
% Boundary curve 4
26
 
pnts= [ 10.0 10.0 10.0 10.0 10.0;
27
 
        0.0   3.0  5.0  8.0 10.0;
28
 
        9.0   7.0  7.0 10.0 10.0];
29
 
crv4 = nrbmak(pnts, [0 0 0 0.25 0.75 1 1 1]);
30
 
 
31
 
srf = nrbcoons(crv1, crv2, crv3, crv4);
32
 
 
33
 
% Draw the surface
34
 
nrbplot(srf,[20 20]);
35
 
title('Construction of a bilinearly blended Coons surface.');