If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

4. Modeling grass

Next let's build a blade of grass using a parabolic arc as a spine.

Want to join the conversation?

• How are the widths of the skeleton lines determined? Are they based on another parabola?
• Good question! They are determined using a sine wave in this example, but a parabola might have worked too. Then we could have added more control points so the width could also be controlled by the artists.
• How the skeleton works mathematically?
• He kind of glossed over that bit, didn't he? Here's one approach:

You can use the intersections of the individual line segments making up the curve to evenly distribute the skeleton lines along the curve. Say, every fourth intersection gets a displayed skeleton line.

Then you need to determine the angle of each skeleton line. The skeleton lines are all perpendicular to the curve. Trouble is, we've located them on the intersections, where there is a very shallow corner. Well, you can't actually get a line that's perpendicular to a corner, but what you can do is bisect the angle of that corner. Create a line that intersects with the corner such that the angles formed with the line segments on either side of the new line are equal. Or such that the angles on opposite sides of the new line are equal to 180 degrees. Either way gets the same result.

Now what about the length of the skeleton lines? If you look carefully at the endpoints of those lines, you might notice that they, like the main curve, describe the same kind of parabolic arc. The lower control points, where the base of the blade is, are offset from the center. There is probably a hidden parameter in the drawing program that determines the width of the base. The upper control point is in the same location as that of the main arc. Draw a line perpendicular to the curve that passes through the middle control point of the main arc, the middle control points of both skeleton curves will lie on that line. The width control determines the distance of those control points from the main arc.
• What kind of program is this?
• The program is to teach you how to make models for making movies or something
• What about modeling something like ferns? Couldn't we simply adjust the `skeleton` algorithm? Looks like we'd need to have user inputs for tweaking the amplitude and period of the sine wave. I mean, sure, it is an increase in complexiy, but it would allow the artists to create other species of underbrush, right?
• Yes, grass is pretty much the simplest object to model, but you can tweak the basic idea to make more complex objects. By changing the how the skeleton is determined, you can more interesting leaves. Going further, you can use a recursive system to generate branches you can make pretty realistic plants. One such system is the L-system: https://en.wikipedia.org/wiki/L-system
• Do you mean perpendicular lines? You'll always find the links directly beneath each video
• Which Software I need to use for this ?
• You don't need any software other than your browser.
• what app or software can i install in my system for me to be able to do animations