Rhino Questions

Discussion in 'Software' started by CET, Dec 4, 2005.

  1. CET
    Joined: Sep 2005
    Posts: 114
    Likes: 0, Points: 16, Legacy Rep: 10
    Location: Utah

    CET Senior Member

    I’m just beginning to learn to use Rhino and have run into a couple of questions I’m hoping the experienced users here can help with.

    Firstly, if possible, I would like to import the outline of an existing hull in the form of an image (jpg, tif, etc.) so I can “trace” it to duplicate the lines in Rhino. I know some programs are capable of this but don’t know whether Rhino is one of them. Is there a way to do this in Rhino?

    Secondly, how does one develop a “cubics” surface in Rhino. I read somewhere that if one is designing a hull with all developable surfaces, it is best to do so using cubics, but I’ve been unable to find how to do that in Rhino.

    Any help with these questions would be appreciated. Thanks.

    Charlie
     
  2. DGreenwood
    Joined: Aug 2004
    Posts: 722
    Likes: 40, Points: 28, Legacy Rep: 507
    Location: New York

    DGreenwood Senior Member

    Here is how I do it for a rough outline of a photo shape.

    With the "TOP" viewport maximised-click "VIEW" then "BACKGROUND BITMAP" then "PLACE" . Select your photo and place on grid. (you'll figure that part out) Trial and error wil teach you how to size it. If you get it wrong go back thru the previous command sequence and you will find a remove button. Try again. When happy start drawing over it. You'll be surprised how accurate you can get them with some practice. Part of the trick is in how you shoot the picture. (Centering and maximizing frame etc.) I use it to pick up shapes for many uses where absolute accuracy is not criticle.
     
  3. DGreenwood
    Joined: Aug 2004
    Posts: 722
    Likes: 40, Points: 28, Legacy Rep: 507
    Location: New York

    DGreenwood Senior Member

    If you have a single straight line measurement from the photographed object, you can then scale the new drawing by going to "TRANSFORM" then "SCALE". I presume you have a manual to help you from there?
     
  4. Raggi_Thor
    Joined: Jan 2004
    Posts: 2,457
    Likes: 64, Points: 0, Legacy Rep: 711
    Location: Trondheim, NORWAY

    Raggi_Thor Nav.arch/Designer/Builder

    If you draw the profile and the plan view of the hull you can later rotate the profile so it's vertical. Then you can make a 3D curve from two 2D curves, one in the plan view and one in the profile view
     
  5. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    Cubic surfaces are just a 3rd order surface. That is, described by SUM_i( SUM_j( P(i,j)*b(i,u)*b(j,v) ) ) where P(i,j) is a matrix of control points and b() is a basis function. As I remember Rhino's "curve degrees" are 1 greater than the order. ie. for 6 points a 5th order B-spline is the same as a 6th degree NURBS curve. In version one I couldn't find any way of changing the degree of a curve, in version 3 you select the degree as you draw it.

    Degrees and orders apply equally to curves and surfaces. Remember though, that curves should be faired, before creating sufaces from them, and surfaces should have as few control points as you can get away with. 5x8 is a good starting place for most sailing boats. The most important thing is to take your time over it. There will be a lot of fairing to do on the surface, so don't rush it.

    Good Luck,

    Tim B.
     
  6. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 149, Points: 63, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    Near the end of the Rhino users manual there's a good tutorial on tracing boat lines. DGreenwood's method is generally pretty good, I don't know any better way.
    If you're trying to keep all surfaces ddevelopable, there's a few ways of doing this. My favourite is to draw plan and profile views of the top and bottom edge of each panel, then use Crv2View to get the 3-D curve. Rebuild that curve with as few control points as possible, then Sweep2 a single straight line along the full length of both. Trim the resulting surface with cutplanes. There are of course other methods. The trick to getting a fair, elegant surface is to use as few control points as possible for each curve that you generate it from, and if necessary to rebuild the surface with as few points as possible. Analyze->Curve->CurvatureGraph is an excellent tool for checking how fair your curves are; there's a few tools for surface fairness too that are also handy.
     
  7. CET
    Joined: Sep 2005
    Posts: 114
    Likes: 0, Points: 16, Legacy Rep: 10
    Location: Utah

    CET Senior Member

    Thank you all for the very helpful replies. I haven't had a chance to try them all yet, but will in the next day or two. Thanks!!
     
  8. Andrew Mason
    Joined: Mar 2003
    Posts: 397
    Likes: 18, Points: 18, Legacy Rep: 206
    Location: Perth, Western Australia

    Andrew Mason Senior Member

    Tim

    Order is always 1 more than degree, for example a cubic curve or surface will be degree 3, order 4; a quadratic is degree 2, order 3; and a linear spline is degree 1, order 2.


    Degree of a plain B-spline is exactly equivalent to the degree of a NURBS curve, similarly order is exactly equivalent between a plain B-splines and NURBS curves.

    Order can never be more than the number of control points, and when order is equal to the number of control points the B-Spline (or NURBS curve, if all weights are equal to zero) is exactly equivalent to a Bezier curve.

    Andrew
     
  9. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    Sorry, Andrew I stand corrected, order is one more than the degree in Rhino.

    However, I think you'll find that the order of a B-Spline curve is always one less than the number of points if you check the maths. A four point B-spline is defined as As^3+Bs^2+Cs+D where A,B and C depend on the Basis function and control points, and D is the offset of the first control point.

    Also, the weights on a Nurbs curve cannot be equal to zero at any point, or the curve/surface equation will become infinite. however, if all the control point weights are 1, a Nurbs curve will be exactly equal to a B-spline curve with order one less than the NURBS degree.

    Tim B.
     
  10. Andrew Mason
    Joined: Mar 2003
    Posts: 397
    Likes: 18, Points: 18, Legacy Rep: 206
    Location: Perth, Western Australia

    Andrew Mason Senior Member

    Tim

    I think you are talking about a cubic spline, which is different to a B-spline. See http://mathworld.wolfram.com/CubicSpline.html and http://mathworld.wolfram.com/B-Spline.html for clarification.

    A B-spline is formulated in exactly the same way as a NURBS, it just doesn't incorporate the weight value.

    By the way, zero weights are perfectly OK for NURBS, they don't cause any numerical problems. One of the things I find remarkable about the NURBS formulation is its ability to mix zero and near infinite terms.

    For example, you can have a three control point curve with the first and third points at the same x value and separated by one unit in the y axis. If the middle control point is placed at halfway between the 1st and 3rd points in the y axis, and as near to infinity as your floating point system will allow in the x axis, and the weight of the 2nd control point is set to zero, the resulting NURBS curve will be a precise semi-circle. Quite a remarkable result in my opinion.

    regards

    Andrew
     
  11. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    I am talking about a non-rational B-Spline. Once you've gone to rational B-Splines you might as well use NURBS.

    Unless I'm much mistaken (or maths has changed since I was at school) a/0 is undefined, and often taken as infinite.

    A semi-circle is correctly (and neatly) defined as having 5 control points, 4 of which are on the corners of the bounding box, and one which is in the middle of the longest edge of the box. The two control points at the furthest corners from the centre have a weight of 0.707107 or sqrt(2)/2, everything else has a weight of 1.

    Tim B.
     
  12. Andrew Mason
    Joined: Mar 2003
    Posts: 397
    Likes: 18, Points: 18, Legacy Rep: 206
    Location: Perth, Western Australia

    Andrew Mason Senior Member

    Tim

    I am talking about non-rational B-splines as well, you seem to think that the cubic spline formulation is a B-spline, but it's not.

    Regarding zero weights, I can assure you that they are valid and acceptable in a NURBS curve or surface. Similarly, negative weights are valid, although they are frowned upon by purists as they violate the convex hull properties of B-splines.

    Regarding the semicircle formulation using infinite control points, these are also a valid (although inconvenient) form. See Les Piegl's paper On the use of infinite control points in CAGD.

    For your semicircle formulation to work you need a knot vector with multiple knots in the middle, a uniform knot vector will not give the correct result. A simpler 4 point, order 4 form, using a uniform knot vector and weights of 0.33' for the 2nd and 3rd control points can be used, see the illustration below.

    regards

    Andrew
     

    Attached Files:

  13. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    so if a/0 gives a valid result, that's why I failed my last maths test :p

    Tim B.
     
  14. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    you may be interested to see this...

    paulmach.com/nurbs/nurbs.pdf

    Tim B.
     

  15. Andrew Mason
    Joined: Mar 2003
    Posts: 397
    Likes: 18, Points: 18, Legacy Rep: 206
    Location: Perth, Western Australia

    Andrew Mason Senior Member

    Tim

    Because the division in the NURBS equation is by a summation over multiple control points, no divide by zero occurs unless all the control points summed have zero weights.

    This does mean that a divide by zero will occur if you create a zero weight for one of the end points of a NURBS curve, or one of the corner points of a NURBS surface, as only the zero weighted point is summed.

    Andrew
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.