P04: 9*48 Stars

12/03/2014 - 閲讀: 3121  

Four 108-Light

  1. <g id='L108b'><!--4Light-->
  2. <g transform='translate(-240,150)'>
  3. <g id='L108' filter='url(#L108F)'>
  4. <g id='Lb36'>
  5. <g id='Lb12'>
  6. <g id='Lb4'>
  7. <g id='Lb2'>
  8. <path id='Lb1' d='M 32,1 L 164,0 32,-1 z'/>
  9. <use xlink:href='#Lb1' transform='rotate(180)'/>
  10. </g>
  11. <use xlink:href='#Lb2' transform='rotate(90)'/>
  12. </g>
  13. <use xlink:href='#Lb4' transform='rotate(30)'/>
  14. <use xlink:href='#Lb4' transform='rotate(60)'/>
  15. </g>
  16. <use xlink:href='#Lb12' transform='rotate(10)'/>
  17. <use xlink:href='#Lb12' transform='rotate(20)'/>
  18. </g>
  19. <use xlink:href='#Lb36' transform='rotate(3.33)'/>
  20. <use xlink:href='#Lb36' transform='rotate(6.66)'/>
  21. </g><!--L108-->
  22. </g>
  23. <use x='-160' y='-220' xlink:href='#L108'/>
  24. </g>
  25. <use xlink:href='#L108b' transform='scale(-1,1)'/>

How to duplicate from 1 light to 108 quickly. There is a trick: the quick way is to devide by smallest int, eg 2, then 3, then 5 ... etc. so 108=2*54=2*2*27=2*2*3*3*3

Trick 2: push the smaller devider deep, as 2*3=3*2, however it saves you tab spacer if you group 2 ealier than 3

Trick 3: how much degrees to rotate? Study carefully from above example, you will get a hint: rest of degrees/devider

If you use inkscape to do above 108 lights:
star108 r1:164 r2:32 arg2:0.029088821
about 35KB in inkcape vs 590 bytes by hand

9*48 Stars

We make 9 stars, actually the big 3 stars are same just filled with different colors, and zoom it so that you can see clearly:

Amazing! Above 9 stars look like a 3D map em2:20

  1. <circle id='fr6' r='6.2' cx='-32' fill='url(#BGfr6)'/>
  2. <circle id='fr5' r='6.2' cx='-22' cy='16.5' fill='url(#BGfr5)'/>
  3. <circle id='fr4' r='6.2' cx='-56' fill='url(#BGfr4)'/>
  4. <g id='b3'><circle id='fr3' r='6.2' cx='-79' fill='url(#BGfr3)'/><use xlink:href='#fr3' x='8' y='14'/><use xlink:href='#fr3' x='95' y='19'/></g><use xlink:href='#b3'/>
  5. <g id='b2' fill='url(#b2a)'>
  6. <circle r='15.36' fill='#f40'/>
  7. <g id='b1' transform='scale(0.32)'><circle r='48'/><circle r='32'/><circle r='16'/><circle r='9'/><circle r='3'/></g>
  8. </g>
  9. <g opacity='0.84'><use xlink:href='#b2' x='50' transform='scale(1.2)'/><circle r='19' cx='60' fill='gold' opacity='0.48'/></g>
  10. <g transform='translate(30.5,-20.5)'><use xlink:href='#b1' fill='url(#b2b)'/><circle r='15' fill='gold' opacity='0.13'/></g>

Based on yesterday's experience, it is easy to duplicate above 9 stars 5 times, and become the following SVG with 9*48 stars:

You can check the html source code to find out today's work.

上篇 « P03: The Back Stars
下篇 » P05: The Head Star

文章分類