tooxoot / plotR

0 stars 0 forks source link

Exlporing bezier-js #3

Open tooxoot opened 7 years ago

tooxoot commented 7 years ago

For intersecting, clipping and the conversion to plotable hpgl all bezier curves need to be converted to polylines. For this conversion bezier-js.

Focus Points

  1. Convert bezier curves to polylines a. Fixed vs dynamic number of steps when using getLUT(...)
  2. Find constraints for the conversion process
tooxoot commented 7 years ago
  1. ⇒ use bezier-js.getLUT(steps: number)

    let curve = new Bezier(150,40 , 80,30 , 105,150);
    let LUT = curve.getLUT(16);
  2. a. ⇒ use fixnum / bezier-js.length()

  3. Constraints:

tooxoot commented 7 years ago

To fix import problems the @types/bezier-js/index.d.ts should be replaced by this file. Import statement should be import Bezier = require( 'bezier-js' );

Question: Should I post a question regarding the current npm file on the according issue?