Jump to content

ShapeMaker - by the Dwarf Horde (Jan 30th, 2016)


Recommended Posts

Seerose , here's a screen cap of what I wrote

 

 

@ Thank you very much for your effort Dear TR! 

When I save on desktop that is "dhp." file extension.

When I save my folder. "xaml" file extension.
Save: Paint >  Shape  "xaml" file exists but not as a shape. 

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to post
Share on other sites

I finally reached the 99 line limit when I was drawing a very fast bird, It still looks good though......

 

@ Seerose, the .dhp is a project file. You need to save as PDN Shape which uses .xaml extension. Then copy that file to your PDN shape folder and restart PDN.

Plane_Sig2.gif

Link to post
Share on other sites

Has any consideration been given to adding cubic splines with second-order continuity at the nodes, and control of the derivatives at the endpoints? I realize that requires solving a set of linear equations for every change, but it's a tridiagonal system, so unless there are a very large number of points in the curve, I'd expect it could be easily accomplished with good performance.

Edited by MJW
Link to post
Share on other sites

I assumed that the spline segments would be converted to the smooth cubic Bezier format once the user indices the operation is complete. The representation as a C2 cubic spline is only necessary while the control points are being moved around. The nodes have to be dealt with as a group as long as they're being edited, because changing any of them changes the others. Once editing is complete, they're just a sequence of cubic Bezier curves which, due to C1 continuity, necessarily share control points at the nodes. The C2 continuity is a consequence of automatically generating the control points, rather than having the user specify them.

Edited by MJW
Link to post
Share on other sites

 

 

I assumed (perhaps incorrectly) that the spline segments would be converted to the smooth cubic Bezier

I don't know an algorithm that coverts cubic splines to Beziers. The two are so different I can't imagine how one can be converted to another.

You would have to create control points that don't exist in a cubic spline ( 2 for every node , not including the start and end). Especially since there's not  one to one relationship between a curve and control points. It's a one to many.

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Link to post
Share on other sites

I don't think they're different at all. They're just piecewise cubic curves. Give me a cubic equation defined on [0,1], and I can give you the control points that would produce it; likewise, give me the four control points, and I can give you the cubic equation they generate.

 

EDIT:

I believe:

B(t) = (1 - t)3 P0 + 3 (1 - t)2 t P1 + 3 (1 - t) t2 P2 + t3 P3

B(t) = P0 + 3 (P1 - P0) t + 3 (P2 - 2 P1 + P0) t2 + (P3 - 3 P2 + 3 P1 - P0) t3

 

The first is from Wikipedia. I'm less certain of the second, which I derived quickly from the first.

 

ANOTHER EDIT:

I believe:

if B(t) = C0 + C1 t + C2 t2 + C3 t3

P0 = C0

P1 = 1/3 C1 + C0

P2 = 1/3 C2 + 2/3 C1 + Co

P3 = C3 + C2 + C1 + C0

 

I can't guarantee I made no mistakes, but no matter what, it can be done.

 

YET ANOTHER EDIT:

A C2 cubic spline is nothing more than a smooth cubic Bezier curve with the non-endpoint control points selected to achieve C2 continuity.

 

STILL ANOTHER EDIT:

This article that may help explain it: Smooth Bézier Spline Through Prescribed Points

 

I do have a slight beef, however. The article uses the additional conditions B0"(0) = 0 and Bn-1"(1) = 0. Those are referred to as "natural" or "free" end conditions, because it's what would occur, more or less, with a mechanical spline if the end points were left alone and not forced into any particular slopes. It allows the curve to straighten out near the ends. Gerald Farin in Curves and Surfaces for Computer Aided Geometric Design says that results in poorly shaped curves (and I believe I've read in other places as well). The better choice is probably to let the user determine tangents at the endpoints, or determine them by Bessel end conditions, which means using the tangents of the parabolas that pass through the first three and last three points. There are also quadratic end conditions, where the first two second derivatives are equal, and the last two second derivatives are equal.

 

ONE MORE EDIT:

Removed misleading not-a-knot comment, which I correct in a later comment.

Edited by MJW
Link to post
Share on other sites

The smooth quadratic Bezier is close to what your describe. Adding a second very similar Curve could be confusing (and a smooth quadratic Bezier is part of StreamGeaometry).

 

I would need to see or create a proof of concept and above that a reasonable advantage to rewrite the current system. 

 

found this online:

https://courses.cs.washington.edu/courses/cse457/07sp/lectures/c2-interp.pdf

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Link to post
Share on other sites
The smooth quadratic Bezier is close to what your describe

 

Excuse my bluntness, but I don't see how the smooth quadratic Bezier as currently implemented in the ShapeMaker is even useful. It seems to draw a parabola between the current two points, based on them and the previous point, resulting in a wildly oscillating curve.

 

That's a good link, though it also uses free-end conditions for the extra two conditions.

Edited by MJW
Link to post
Share on other sites
Additionally, if the spline loops around, so the last point attaches to the first, the best choice is called "not-a-knot conditions." That means C2 continuity where the nodes join. I know there's a bit of trickiness involved in that case in making the linear system tridiagonal, but Farin says it can be done.

 

 

RE-EDIT: Now I understand the "not-a-knot" condition (which I had never given any thought to before yesterday). It has nothing to do with splines in which the starting and ending point are joined. Those are periodic end conditions. In not-a-knot splines, the cubic function between the second and third nodes is the same as the one between the first and second nodes. Likewise, for the other end. So the second and next-to-last nodes are not knots.

Edited by MJW
Link to post
Share on other sites

 

 

Excuse my bluntness, but I don't see how the smooth quadratic Bezier as currently implemented in the ShapeMaker is even useful. It seems to draw a parabola between the current two points, based on them and the previous point, resulting in a wildly oscillating curve

Smooth Quadratic Bezier part of StreamGeometry therefore Shapemaker must be able to import and edit it.

 

There are lots of other different spline interpolation Cubic, Cardinal, Hermetic and my favorite Catmull-Rom, but there's an overlap in functionality with the existing curves. In order for us to change the layout, graphics , functionality , programming, documentation and subsequently debug and HDPI coordination there must be reasonable advantage to using that specific spline interpolation.

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Link to post
Share on other sites

There may be, in a theoretical sense, overlap, because, as I've mentioned, they're all piece-wise cubic equations. From a practical point of view, there's no overlap that I can see between what I propose be added to ShapeMaker, and what's already there. The most basic requirement to easily make good shapes is the ability to conveniently draw a smooth curve that follows a particular path. How can this be done in ShapeMaker? I don't see a way.

 

Here's a example. Draw a smooth curve or load an image with a smooth curve, then run ShapeMaker and try to trace along the curve. At best, it's very difficult. With cubic splines, it could be done by simply clicking points along the curve, and depending on the end conditions, adjusting the tangents at the endpoints.

Link to post
Share on other sites

Here's a example. Draw a smooth curve or load an image with a smooth curve, then run ShapeMaker and try to trace along the curve. At best, it's very difficult. With cubic splines, it could be done by simply clicking points along the curve, and depending on the end conditions, adjusting the tangents at the endpoints.

 

Apple? http://forums.getpaint.net/index.php?/topic/32128-eers-miscellaneous-shapes/ 

Link to post
Share on other sites

Most anything can be done with enough persistence. People make models of the Eiffel Tower out of toothpicks. The apple's nice, but those are all rather simple shapes. Shapes that basic should be so easy to produce that they'd hardly be worth sharing. It's like using an Etch-a-Sketch: you can draw some pretty pictures, but it'd be a lot easier to use a pencil.

Edited by MJW
Link to post
Share on other sites

The apple's nice,

You should have stopped right there.

...but those are all rather simple shapes. Shapes that basic should be so easy to produce that they'd hardly be worth sharing.

When I put my shape pack together, I went out of my way to make my shapes as simple as possible so they would appeal to the widest range of people.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites

I wasn't criticizing it; I was pointing out it's not a counterexample to my assertion that the current version of ShapeMaker doesn't provide an convenient method of producing complex shapes. That it was intentionally simple doesn't change that.

Edited by MJW
Link to post
Share on other sites

 

 

I was pointing out it's not a counterexample to my assertion that the current version of ShapeMaker doesn't provide an convenient method of producing complex shapes.

And I think it does. But that's just my opinion.

 

Kitten! http://forums.getpaint.net/index.php?/topic/32140-trs-not-too-useful-but-fun-shapes/?p=430693

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Link to post
Share on other sites

Most adorable kitten! And a very impressive job. But if you superimpose the lines over the image, they don't really line up that well in some places, so it's not really an accurate tracing. And perhaps I'm mistaken, but I doubt it was easy to do. It certainly wouldn't have been easy for me. The point is, if there were a cubic spline that only required adding nodes along the image path, such things would be quick and easy, not feats to be admired.

Link to post
Share on other sites

Seerose,

 

Can you post the xaml file  and possibly a screen capture ( STRG + DRUCK and paste in Paint.Net) of the your Shapes folder?

 

b9pcbshe.png

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to post
Share on other sites

TR, I am trying to make an arrow head but I have a little issue:

 

When I use it as a "Draw Shape Outline", The upper left point is not as sharp as the upper right point as on the green example. The problem is more visible when I make a narrow shape as the blue example on the left however, when I "Draw a Filled Shape" the problem goes away.

 

arrowhead-4ca2771.png

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...