Hmmm replacing 120, with 125 and I see the line.. just off one of the other lines.
the problem is that rotate and other transforms are incrementally added to the draw affine matrix (multiplied to one matrix). As such doing what you did results in angles
rotate 0 -- 0
rotate 60 -- 60
rotate 120 -- 180
rotate 180 -- 360, or 0 (overwrite)
rotate 240 -- 240
rotate 300 -- 540 or 180 (overwrite)
So what appeared to be missing is 120 and 300 are actually drawn, but on top of something else.
Solution use graphic contexts to save and restore the state (affine wrapping matrix).
See Push and Pop Context
http://www.imagemagick.org/Usage/draw/#push_context
Code: Select all
convert -size 2592x1994 xc:white -strokewidth 10 -stroke black -draw "\
translate 1000,900
push graphic-context rotate 0 Path 'M 600,0 600,200' pop graphic-context
push graphic-context rotate 60 Path 'M 600,0 600,200' pop graphic-context
push graphic-context rotate 120 Path 'M 600,0 600,200' pop graphic-context
push graphic-context rotate 180 Path 'M 600,0 600,200' pop graphic-context
push graphic-context rotate 240 Path 'M 600,0 600,200' pop graphic-context
push graphic-context rotate 300 Path 'M 600,0 600,200' pop graphic-context
" test.png
Which keeps the translation, but removes the rotation additions to the translation matirx
OR this whcih is increment rotations
Code: Select all
convert -size 2592x1994 xc:white -strokewidth 10 -stroke black -draw "\
translate 1000,900 Path 'M 600,0 600,200'
rotate 60 Path 'M 600,0 600,200'
rotate 60 Path 'M 600,0 600,200'
rotate 60 Path 'M 600,0 600,200'
rotate 60 Path 'M 600,0 600,200'
rotate 60 Path 'M 600,0 600,200'
" test.png
OR this which uses a affine setting to set the translation outside draw, (and imported by draw) and then does the rotation inside draw.
Code: Select all
convert -size 2592x1994 xc:white -strokewidth 10 -stroke black \
-affine '1,0,0,1,1000,900' -draw "Path 'M 600,0 600,200'" \
-draw "rotate 60 Path 'M 600,0 600,200'" \
-draw "rotate 120 Path 'M 600,0 600,200'" \
-draw "rotate 180 Path 'M 600,0 600,200'" \
-draw "rotate 240 Path 'M 600,0 600,200'" \
-draw "rotate 300 Path 'M 600,0 600,200'" \
test.png
Take your pick. The latter is probably slower, (and a bit faster in IMv7 magick, but still slower than the other two).
I have not done any timing tests, though canvas generation and I/O probably still take up more time than the actual draw.