3
$\begingroup$

I'm using "Drawing Tools" to decorate an imported image (a TIFF file). I need to create a set of regularly spaced parallel lines, and my solution for doing this is to create a pair of parallel lines (we have an LHS line and an RHS line), copy this pair, superimpose the copied LHS line on the previous RHS line, and then delete the previous RHS line. Doing this repeatedly gives me an array of parallel lines, which are all a fixed distance apart.

My question is: while selecting multiple graphics primitives (lines here) how do I snap one primitive to a previously placed primitive decorating the image similar to how one can do this in Adobe Illustrator?

Also, is there an easier way for me to automatically generate a set of parallel lines which can be translated / stretched apart using my mouse?

$\endgroup$
4
$\begingroup$

For the second part of your question, you can simply generate them in a cell:

Graphics[Line[Table[{{x, -10}, {x , 10}} , {x, 1, 10} ]]]

enter image description here

then copy and paste them into a graphic, where they're a group that can be moved, stretched, etc.

lena in jail

$\endgroup$
  • $\begingroup$ Thanks that's very helpful! But I can't seem to paste into the graphic? It seems to just copy over the image? Using "Show[...]" also doesn't seem to work. $\endgroup$ – Bob Mar 24 '13 at 14:06
  • $\begingroup$ It's all to do with what you've got selected, and choosing the right menu option. Some experimentation is probably the best way - it's harder to write about than to do. $\endgroup$ – cormullion Mar 24 '13 at 14:16
  • $\begingroup$ I'm sure I'll get it eventually. Thanks! $\endgroup$ – Bob Mar 24 '13 at 14:20
  • $\begingroup$ I'm used to using Illustrator, so it's hard to switch into the Mathematica way of interactive drawing. But at least you can automate some of the graphics generation...:) $\endgroup$ – cormullion Mar 24 '13 at 14:27

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.