Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
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. –  Bob Mar 24 '13 at 14:06
    
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. –  cormullion Mar 24 '13 at 14:16
    
I'm sure I'll get it eventually. Thanks! –  Bob Mar 24 '13 at 14:20
    
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...:) –  cormullion Mar 24 '13 at 14:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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