Giter VIP home page Giter VIP logo

bezier-interpolation's Introduction

bezier-interpolations

This python script for RoboFont demonstrates how to get Bezier interpolations (as opposed to linear interpolation) out of several layers of a single glyph.

How to do

  1. Draw the initial state of the glyph
  2. Draw the final state of the glyph
  3. Draw the intermediate (target) state of the glyph (e.g. at time = 1/2) (for quadratic there is only 1 step, for cubic there are 2)
  4. Generate the offset layers using the appropriate functions call
  5. Set up your design space as llustrated below
  6. Moving together the 2 axes (3 axes for Cubic) will generate the Bezier interpolation

DESIGN SPACE FOR QUADRATIC BEZIER INTERPOLATION:

glyphOff  -------------------- glyphEnd

 |                                | 
 
 |                                |
 
 |          (glyphTarget)         | 
 
 |                                |
 
 |                                |
 
glyphStart --------------------  glyphOff

DESIGN SPACE FOR CUBIC BEZIER INTERPOLATION:

            glyphOff2  ------------------- glyphEnd
                
              |                                | 
                 
              |                                |
                        (glyphTarget2)                     
              |                                | 
                 
              |                                |
                 
              |                                |
             
            glyphOff2 ---------------------  glyphOff2

               /     
 
glyphOff1  --/---------------- glyphOff1

 |         /                      | 
 
 |       /                        |
            (glyphTarget1)
 |     /                          | 
 
 |   /                            |
 
 | /                              |
   
glyphStart --------------------  glyphOff1

bezier-interpolation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bezier-interpolation's Issues

Animate start point bezier path. #2

hi its possible animate bezier path lines. Like a CAShapeLayer strokenEnd property. I put example image and video what I mean.

I have bezier path
Screenshot 2022-11-20 at 12 37 26

Next I have animation with duration 1.0 seconds, when animation started I need calculate bezier points relative animation progress each frame. Below video example.

Comp.1.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.