File:Japanese Wave Pattern.svg

Original file(SVG file, nominally 1,600 × 1,200 pixels, file size: 4 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

edit
Description
English: A vectorgraphic of a japanese wave pattern.
Date
Source Own work
Author Shisma

Sourcecode

edit

The image was written in pug and can be compiled using the pug command line interface.

mixin wave-pattern
  - var width = attributes.width;
  - var height = width/2;
  - var stroke_width = attributes['stroke-width'] ? attributes['stroke-width'] : 1;
  - var lines = attributes['lines-per-circle'] ? attributes['lines-per-circle'] : 1;
  - var fill = attributes.fill ? attributes.fill : 'white';
  - var stroke =  attributes.stroke ? attributes.stroke : 'red'
  - var stoke_gap_width = attributes['stroke-gap-width'] ? attributes['stroke-gap-width'] : stroke_width*2;
  mixin wave-pattern__circle
    - var r = width/2 - stroke_width/2;
    - var n = 0;
    while n <= lines
      - var this_r = r-(n*stoke_gap_width);
      if this_r > 0
        circle(cx=attributes.cx, cy=attributes.cy, r=r-(n*stoke_gap_width), stroke-width=stroke_width, stroke=stroke, fill=fill)
      - n++;
  - var offset = .5;
  pattern(id=attributes.id, width=width, height=height, patternunits='userSpaceOnUse')
    +wave-pattern__circle(cx=width/2, cy=0)
    +wave-pattern__circle(cx=0, cy=height*offset)
    +wave-pattern__circle(cx=width, cy=height*offset)
    +wave-pattern__circle(cx=width/2, cy=height)
    +wave-pattern__circle(cx=0, cy=height*offset+height)
    +wave-pattern__circle(cx=width, cy=height*offset+height)

- var width = 1600;
- var height = 1200;

svg(width=width, height=height, xmlns='http://www.w3.org/2000/svg' viewbox="0 0 " + width + " " + height)
  defs
    +wave-pattern#waves(width='300', lines-per-circle="6", stroke-width="5", stroke-gap-width="20" stroke='green')
  
  rect(x=0, y=0, height=height, width=width, fill="url(#waves)")

Licensing

edit
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:52, 26 May 2017Thumbnail for version as of 11:52, 26 May 20171,600 × 1,200 (4 KB)Shisma (talk | contribs)User created page with UploadWizard

The following page uses this file:

Metadata