Tuesday, 25 March 2014

Path component - video 11

Path component in SVG

Can be used to create any shape!

d3 has path generators.

Stored in the "d attribute" - I don't understand that yet.

draw a line using data...


Debugging d3

Go to console and you get error messages there.

Lesson 12
   Making an arc - create a path.
   var arc = d3.svg.arc()
    .innerRadius
    .outerRadius
    .startAngle
    .endAngle

    Create a path

Angles NOT measured in degrees - rather we use Radians.
When a portion of the circumferance equals the radius then that equals one radian.

Number of radians in a circle is PI multiplied by 2.


No comments:

Post a Comment