MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Points getting moved by BezierFunction? Moving an array of

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118301] Points getting moved by BezierFunction? Moving an array of
  • From: "Christopher O. Young" <cy56 at comcast.net>
  • Date: Thu, 21 Apr 2011 03:09:35 -0400 (EDT)

Even though all the control points have their maximum x coordinate around
10, the BezierFunction is plotting a long, narrow surface that gets
stretched out to x = 40 or so.

It may be partly due to the fact that the curves between the points don't
start at the x axis and at z = 0 the way I meant them to.

Any help for a beginner trying to figure out how to translate each set of
points so that it starts with x and y coordinates of zero? That is, I just
want to produce a new array for each set of points, where I subtract the x
and y coordinates of the first point from each of those points.

Thanks in advance for any help.

Chris Young
cy56 at comcast.net


pts = {
  {{1.796875, 1.34375, -9}, {2.15625, 1.34375, -9}, {2.296875, 

1.359375, -9}, {2.375, 1.46875, -9}, {2.46875, 
    1.671875, -9}, {2.53125,
1.78125, -9}, {2.578125, 
    1.9375, -9}, {2.6875, 1.96875, -9}, {2.71875,
    1.78125, -9}, {2.734375, 1.609375, -9}, {2.921875, 
    0.421875, -9},
{3.03125, 0.125, -9}, {3.078125, 
    0.03125, -9}, {3.296875, 0.078125,
-9}, {3.484375, 
    0.0625, -9}, {11.5625, 0, -9}},
  
  {{1.625, 1.171875,
-8}, {2.234375, 1.171875, -8}, {2.359375, 
    1.1875, -8}, {2.5, 1.296875,
-8}, {2.765625, 
    1.421875, -8}, {2.828125, 2.015625, -8}, {2.9375, 

2.328125, -8}, {3.1875, 2.34375, -8}, {3.234375, 
    2, -8}, {3.328125,
1.59375, -8}, {3.453125, 
    1.234375, -8}, {3.609375, 0.75, -8},
{3.421875, 
    0.515625, -8}, {3.953125, 0.09375, -8}, {4.234375, 

0.203125, -8}, {11.4375, 0.203125, -8}},
  
  {{1.390625, 1.03125, -7},
{2.234375, 1.015625, -7}, {2.46875, 
    1.0625, -7}, {2.59375, 1.15625,
-7}, {2.890625, 
    1.5625, -7}, {3.15625, 2.1875, -7}, {3.359375, 

2.796875, -7}, {3.625, 2.78125, -7}, {3.734375, 
    2.171875, -7},
{3.90625, 1.46875, -7}, {4.15625, 
    0.59375, -7}, {4.359375, 0.03125,
-7}, {4.453125, 
    0.15625, -7}, {4.5625, 0.328125, -7}, {5.09375, 

0.421875, -7}, {11.171875, 0.390625, -7}},
  
  {{1.203125, 0.875, -6},
{2.328125, 0.84375, -6}, {2.578125, 
    0.875, -6}, {2.6875, 0.953125, -6},
{3.140625, 
    1.515625, -6}, {3.4375, 2.15625, -6}, {3.84375, 
    3.0625,
-6}, {4.25, 3.0625, -6}, {4.40625, 2.34375, -6}, {4.65625,
     1.625, -6},
{5.0625, 0.515625, -6}, {5.46875, 
    0.359375, -6}, {5.578125, 0.53125,
-6}, {5.84375, 
    0.5625, -6}, {6.625, 0.59375, -6}, {10.96875, 0.5625,
-6}},
  
  {{1, 0.6875, -5}, {2.546875, 0.671875, -5}, {2.734375, 

0.71875, -5}, {2.953125, 0.84375, -5}, {3.609375, 
    1.609375, -5},
{4.0625, 2.578125, -5}, {4.359375, 
    3.359375, -5}, {4.890625, 3.375,
-5}, {5.15625, 
    2.515625, -5}, {5.5, 1.734375, -5}, {6.0625, 

0.484375, -5}, {6.625, 0.390625, -5}, {6.75, 
    0.59375, -5}, {6.9375,
0.703125, -5}, {8.03125, 
    0.75, -5}, {10.84375, 0.734375, -5}},
  

{{0.75, 0.53125, -4}, {3.265625, 0.515625, -4}, {3.390625, 
    0.546875,
-4}, {3.59375, 0.640625, -4}, {3.78125, 
    0.828125, -4}, {4.25, 1.625,
-4}, {5.015625, 
    3.0625, -4}, {5.40625, 4.15625, -4}, {6.25, 

4.140625, -4}, {6.640625, 3.0625, -4}, {7.578125, 
    1.21875, -4},
{8.234375, 0.40625, -4}, {9.171875, 
    0.625, -4}, {9.390625, 0.765625,
-4}, {9.703125, 
    0.890625, -4}, {10.546875, 0.875, -4}},
  

{{0.484375, 0.390625, -3}, {2.984375, 0.34375, -3}, {3.734375, 

0.34375, -3}, {3.890625, 0.359375, -3}, {4.046875, 
     0.375, -3},
{4.265625, 0.453125, -3}, {5.609375, 
     1.875, -3}, {6.5625, 2.6875, -3},
{6.78125, 
     2.828125, -3}, {6.984375, 2.890625, -3}, {7.203125, 

2.96875, -3}, {8.34375, 3.09375, -3}, {7.46875, 
     3.046875, -3},
{8.90625, 3.140625, -3}, {9.296875, 
     3.125, -3}, {10.03125, 3.109375,
-3}}
   
   {{0.28125, 0.234375, -2}, {1.75, 0.25, -2}, {2.796875, 

0.203125, -2}, {3.84375, 0.265625, -2}, {4.625, 
     0.28125, -2}, {4.875,
0.28125, -2}, {5.046875, 
     0.328125, -2}, {5.234375, 0.484375, -2},
{6.171875, 
     1.109375, -2}, {6.796875, 1.578125, -2}, {7.234375, 

1.8125, -2}, {7.625, 1.984375, -2}, {7.921875, 
     2.015625, -2}, {8.1875,
2.046875, -2}, {9.28125, 
     2.015625, -2}, {9.84375, 2.015625, -2}},
  

{{0.625, 0.1, -1}, {1.25, 0.1, -1}, {1.875, 0.1, -1}, {2.5, 
    0.1, -1},
{3.125, 0.1, -1}, {3.75, 0.1, -1}, {4.375, 0.1, -1}, {5,
     0.1, -1},
{5.625, 0.1, -1}, {6.25, 0.1, -1}, {6.875, 
    0.1, -1}, {6.25, 0.1, -1},
{8.125, 0.1, -1}, {8.75, 
    0.1, -1}, {9.375, 0.1, -1}, {10.265625,
0.109375, -1}}


Show[
 ParametricPlot3D[
  BezierFunction[pts][u, v], {u, 0, 1}, {v, 0, 1},

MeshFunctions -> {#1 &, #3 &},
  AxesLabel -> z]
 ]



  • Prev by Date: Re: trouble printing to PDF
  • Next by Date: Re: Coloring a ListSurfacePlot3D with a n x 4 matrix
  • Previous by thread: Re: Printing "full version" or "publication version" of same notebook?
  • Next by thread: RectangleWave[ ] Notebook containing the definitions for who ever will need it