So, I have to collect all the points that make up the red top part of the stroke and then using the oppositePoints to construct the bottom part of the stroke in blue in my image. For each subdivision I get two points that I call "heightPoints" (orange and purple) just in opposite directions and I keep them in separate arrays - "points" for orange points and "oppositePoints" for purple points.Īfter I've collected all the points from left to right, I reverse the "oppositePoints" and combine them with "points" so they're all in order to be joined together as a path around the stroke. Using those subdivisions (orange), I can get the heights for them using the falloff function. The algorithm basically subdivides the stroke along its start and end lengths along the path. The falloff function controls the shape of the stroke using a mathematical expression, the power n controls the smoothness of the stroke. LineThickness - the max thickness of the stroke. LineLength - the full length of the stroke line, how many pixels it extends along a path Subdivision - the more of these the smoother the stroke I've attempted to create my own tapered stroke function which generate this kind of stroke along a path from it's center can control the properties by setting them from the drawTaperedStroke() function at the top
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |