Code Monkey home page Code Monkey logo

circle-morphing's Introduction

Circle Morphing

Computational interpolations from a circle-to-a-square, and circle-to-a-triangle, using p5.js

Morph #06 from Circle to Triangle

References / See Also:

--

Some Ways of Transforming a Circle into a Square

  1. (code) by progressively deleting all points except for the square's corners
  2. (code) by approximating a circle with four Bezier cubic splines and modulating the spline control points
  3. (code) by approximating a circle with four circular arcs whose radii lengthen to infinity
  4. (code) by linearly interpolating points on the circle towards points on the square, along radii of the circle
  5. (code) by progressively moving points evenly sampled along the circle, towards points on the square, resampled at equal intervals, by small random amounts
  6. (code) by treating it as a rounded rect, whose (rounded) corners have a dynamic radius
  7. (code) by treating it as a multisided polygon whose number of sides gradually decreases to four
  8. (code) by gradually flattening the circle on four sides
  9. (code) by gradually shrinking the circle's radius, revealing square corners within
  10. (code) by treating points along the perimeter as a series of springy particles
  11. (code) by considering it as a set of alternating straight lines and arcs in which the arcs shrink while the lines grow
  12. (code) by using a 'superellipse' formula
  13. (code) by progressively subdividing it into a 4-gon, 8-gon, 16-gon, 32-gon, etc., with smooth interpolations.
  14. (code) by abruptly moving points evenly sampled along the circle, towards corresponding points on the square

--

Some Ways of Transforming a Circle into a Triangle

  1. (code) // by sampling a circle into many vertices, and then locally averaging each point with its neighbors, except for the three special corner vertices.
  2. (code) by progressively deleting all points except for the triangle's corners
  3. (code) by approximating a circle with three Bezier cubic splines and modulating the spline control points
  4. (code) by approximating a circle with three circular arcs whose radii lengthen to infinity
  5. (code) by linearly interpolating points on the circle towards points on the triangle, along radii of the circle
  6. (code) by progressively moving points evenly sampled along the circle, towards points on the triangle, resampled at equal intervals, by small random amounts
  7. (code) by treating it as a rounded triangle, whose (rounded) corners have a dynamic radius
  8. (code) by treating it as a multisided polygon whose number of sides gradually decreases to three
  9. (code) by gradually flattening the circle on three sides
  10. (code) by gradually shrinking the circle's radius, revealing triangular corners within
  11. (code) by treating points along the perimeter as a series of springy particles
  12. (code) by considering it as a set of alternating straight lines and arcs in which the arcs shrink while the lines grow
  13. (code) by treating the form as a series of 6 circular arcs, alternatingly with small and large radii
  14. (code) by progressively subdividing it into a 3-gon, 6-gon, 12-gon, 24-gon, etc., with smooth interpolations.

circle-morphing's People

Contributors

golanlevin avatar

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.