10

I've seen this How can I create a double helix? question but I am here to ask you how to create a double-helix in Inkscape, instead of illustrator. I have tried to achieve this via creating two sine waves (using the Parametric Curves extension) and doing some cutting and colouring-in from there and this is what I’m at at the moment. After this I would create another sine wave with the opposite vertical orientation (which would be the second helix) and go from there.

This is what I have so far from the sine wave method; see in the first instance where I wanted to colour between the waves, the coloured area would form part of the helix.

enter image description here


I have also tried vectorizing a structure of DNA drawn using Accelrys DS Visualizer and failed pretty miserably: I find it impossible to seamlessly vectorize such complex raster files. See below for the original image if you have the skill to vectorize it in a way you could share with me I'd be more than willing to hear. I would like to know is there any better ways of doing this.

This double helix is the one I obtained using Accelrys DS Visualizer, with later GIMP editing (mostly in an effort to make it easier to vectorize, you may note that the helix backbone is no longer coloured in shades of white like it was originally).

enter image description here

  • Should your helix rather be looking as if it was made out of a flat band (as in the linked question) or rather as if it was made out of a solid tube (as in the bottom picture)? – Wrzlprmft Dec 27 '14 at 1:40
  • I don't know what a flat band is. All I want is a decent-looking double helix structure created in Inkscape. I'm not picky as to how it is made. – BH2017 Dec 27 '14 at 1:52
  • @BrentonHorne if the below answer has answered your question please mark it with a checkbox to indicate its the accepted answer. – DᴀʀᴛʜVᴀᴅᴇʀ Oct 21 '15 at 21:09
13

OK, here we go:

  1. Create a rectangle and use Extensions → Render → Function Plotter with these settings:

    enter image description here

    You can use a finer sampling or a higher (integer) End X value, but the following should hold (with n being a small positive integer of your choice):

    [Number of Samples] = [End X] × 4 × n + 1

    You should get something like this:

    enter image description here

  2. Duplicate the sine wave, shift it horizontally (holding Ctrl) and make the duplicate red (for better distinction).

    enter image description here

  3. Duplicate the red sine and make the duplicate green.

  4. Select the green sine and switch to the Edit Path by Nodes mode. Select all nodes fully in the lower half, Break path at selected nodes, select all nodes in the lower half once more and remove them:

    enter image description here

  5. Ensure that the green path is in front of the black one (press Pos1 while selecting it). Select the green path and the black path and Path → Cut Path. The green path should vanish and your black path should be split into several segments.

  6. Select the red path, swich to Edit Path by Nodes mode, select all the uppermost nodes and Break Path at selected Nodes. (We won’t need this until the very last step, but now is the best time to do it.)

  7. Activate snapping, Snap nodes or handles and Snap to smooth nodes from the snap panel.

  8. Select a black segment somewhere in the middle and switch to the Edit Path by Nodes mode. Select an end point as follows and move it to the adjacent extremum of the red path such that it snaps:

    enter image description here ——————→ enter image description here

  9. Select the deformed path and Make selected segments lines.

  10. Repeat with all analogous paths. (Yes, this is repetetory but unless your helix is very long, this is the quickest way.):

    enter image description here

  11. Select all the black segments and Path → Combine.

  12. Repeat steps 3 to 10, exchanging red and black as well as upper and lower in the instructions. (Note that some steps could be skipped as they do nothing now.)

    enter image description here

  13. Select everything, make the path colour as you desire and use butt caps or round caps for the paths.

  14. Use bucket fill between the paths. To make the fill cover everything, temporarily decrease the stroke width of your lines to a very low value and give the fill a stroke in the same colour as the fill.

    enter image description here

  15. Duplicate your helix, move it horizontally, and colour it as desired.

  16. Ungroup and break apart everything. Align all the objects correctly.

    enter image description here

  • Very detailed answer! – Yisela Dec 27 '14 at 14:22
3

I discovered another way to do it which was easier for me:

  1. Follow Wrzlprmft’s answer up to step 2:

  2. Use Extensions → Generate from path → Extrude (mode: lines). It automatically makes the straight edges which you need.

  3. Delete some nodes which you don't need.

  4. Use the bucket tool to add the fill and the helix/spring/ribbon can be realized.

3

I have been "playing" with this kind of helix lately. I use a PHP library that I developed to generate SVG and the image I generate is SVG. If you talk about straight double helix, the solution is not difficult since it can be generated with my scripts and the helix is based on the mathematical expression:

  x = r * cos(t); 
  y = r * sin(t); 
  z = k * t;

I also generate plasmid-like DNA helix i.e. circular double helix.
Please have a look at
http://veleta.rosety.com

(Edited 2015/12/17) I have changed the script and instead of PHP I am currently producing the DNA on HTML5 canvas.

The resulting DNA Helix is in PNG format (once you are happy with the results you ca save it right-clicking on it) Example

enter image description here enter image description here enter image description here

  • Impressive tool! – JohnB Oct 21 '15 at 21:35
1

How scientifically accurate do you need this to be? If you only need an artistic representation, you can get away with something less complex and more figurative.

You could probably use the type tool and type out two "s"-es with a suitable font, convert them to paths, place them over each other appropriately and have the start of your helix that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.