There's no easy way to draw springs, coils, sinusoids, etc. The only way to do this is with a bézier curve (too much precision required), hand-drawn (even more), or with ellipse arcs (and everyone knows how ugly a "sinusoid" drawn with half ellipses is). It might be a good idea to include a line shape that allowed to draw * a sinusoid * a "coil" or "spring" * a cycloid or trochoid (I doubt anyone actually wants to draw this, but it would be a particular case of "coil") The parametric formula (for a horizontal coil) is { x = t * L/2pi + e*H/2 * cos(t+t0) { y = H/2 * sin(t+t0) { for t = 0 ... W / (L/2pi) where H is the height (amplitude), W the width (length), L the distance between loops (wavelength), e the eccentricity (e=0: sinusoid; e=1: trocoid; 0<e<1: another coil-shaped line), and t0 the initial phase.
enhancement request. inherited from OOo
While having a function plotter in Draw sounds interesting, I'd say this is out of scope. As a workaround (it's rather the intended interaction in an office suite) you could enter the function in Calc, plot the data and copy/paste the result to Draw.
I want to clarify that the main point of this report was not plotting arbitrary functions nor rigorously accurate shapes, but rather to provide a shape that *resembles* a "wave" or a "spring". This would be useful in the same way that it's useful to have curved arrows, clouds, or smileys; i.e. to decorate drawings and presentations. The mathematical functions I wrote were just one way to generate them, although I guess that approximating it with Bézier curves would be easier to implement (it does not need to be an exact shape; just something that "looks like a coil"). (I mentioned the cycloid and trochoid just because they were just particular cases of "a coil in perspective", not because I thought those mathematical shapes were necessary. Maybe it was a mistake to mention them since they're out of the point of this report.)
(In reply to cousteau from comment #3) > I want to clarify that the main point of this report was not plotting > arbitrary functions nor rigorously accurate shapes, but rather to provide a > shape that *resembles* a "wave" or a "spring". Sorry, misunderstood this. Wouldn't this shape have an odd size limitation? And what category do you suggest for this type of shape? I mean, currently we have way too many categories and objects in the gallery. That might be convenient for users who know what they are looking for but browsing through the gallery is a pain.
Probably the Symbols category would be the best suited. What do you mean with size limitation?
(In reply to cousteau from comment #5) > What do you mean with size limitation? Gallery objects have a fix size, and when you need a coil with 200px you have to scale up the predfined 100px object (for example) to double its original size. (In reply to Heiko Tietze from comment #2) > While having a function plotter in Draw sounds interesting, I'd say this is > out of scope. Not so sure anymore, and perhaps it can be done easily. Such a special curve could start as a simple sinusoid and offer special options. Could be an outstanding feature.
The coil could be an interesting object for custom shapes, if possible.
Re-evaluating the EasyHack in 2022 This enhancement is still relevant. I don't see springs, coils, sinusoids or other similar shapes available in the menus or toolbars. These shapes can be drawn using some input parameters taken from the user.