![]() The next post will be a simple wrap up, links to all the lessons, and a few useful extra links to more documentation and other brush scripts to study. I hope these lessons have been fun for you, but we’ve reached the end (for now, but we all know a supervillain script writer may re-appear later). Putting it all together, we have a non-rotating brush script like this: lastDrawX 0 lastDrawY 0 firstDraw true function drawcathead(w, x, y) bsbezierbegin (-0.3, 0.5) - starting point bsbezierl (0.3, 0.5) - flat across head bsbezierc (1.0, 1.8, 1.2, -0.6, 0, -0. When a function perfoms a return, control immediately returns to it’s commander, it doesn’t wait until reaching an end - but you still need the end to see where a section, umm, ends. Note: I may have been misleading in earlier lessons. Local distance = bs_distance( lastDrawX - x, lastDrawY - y ) Local br, bg, bb = bs_bg() - background colour chip add some eyes (very simple, not designed to rotate) Putting it all together, we have a non-rotating brush script like this: lastDrawX = 0īs_bezier_begin (-0.3, 0.5) - starting pointīs_bezier_mul (w, -w) -resize to brush widthīs_bezier_move (x, y) - move Bezier shape to the cursor bs_bezier_rotate(rotation) - rotate to follow cursor ![]() I’ve been very lazy here, simply using small changes to x and y to place the eye ellipses, without calculating the direction of the brush.Īs a result, I’ve turned off the rotation of the Bezier shape to follow the cursor direction, by commenting out the direction code, putting – (two dashes, or hyphens) in front of each line to turn that line into a comment, but leaving it there for the future rather than deleting it completely - maybe one day I’ll sit down and work out the correct code for eye rotation and position, or draw them as the official ECO triangles. This time I have placed the eyes in relation to the cursor x, y, position (I can neither confirm nor deny that I work for a branch of Evil Cat Overlords - the secret worldwide ECO-friendly organisation.) ![]() Feel free to move the decimal point (multiply each number by 10) if you find that simpler. Plot the points out on a piece of graph paper (with 0, 0 in the middle) to see the shape. Now that we understand drawing polygons over the last two lessons, let’s draw some curved shapes instead.įor a random shape, we’ll draw a stylized cat head. 3 notes JMaking brush scripts, part 8 Smooth moves, minion! Drawing Bezier shapes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |