Code Monkey home page Code Monkey logo

Comments (6)

earlygrey avatar earlygrey commented on July 28, 2024

Hey!

I'm having trouble visualising exactly what you mean, do you mean that would be a sort of demo thing which animates these or something like that? So the intention would be to use shape drawer to "showcase" the interpolations?

from shapedrawer.

raeleus avatar raeleus commented on July 28, 2024

That's basically what I had in mind, except that it won't "animate" it necessarily. It will basically reproduce those graphs exactly as you see them, except that they can be scaled to any size. I know it won't be useful in the strictest sense, but it would be a nice thing to show off to people.

from shapedrawer.

raeleus avatar raeleus commented on July 28, 2024

Now that I think about it, there is a practical use for this sort of graph. See here: https://youtu.be/dTjSLtefjvI?t=10

Making your own custom graph will be easy if you supply your own custom Interpolation...

from shapedrawer.

earlygrey avatar earlygrey commented on July 28, 2024

I wouldn't want to put those in the ShapeDrawer class, as it would add to the already large number of drawing methods, however I had considered something like extra drawer classes that could add extra methods not considered elementary shape drawing. In that case, methods like these could go there, as long as they're general enough to be considered useful themselves (eg methods to help draw graphs). These extra drawer classes would be instantiated as separate objects to the ShapeDrawer object.

When I say "extra drawer classes", I mean something like a GraphDrawer class, with methods to help draw eg those interpolation graphs. These would accept a ShapeDrawer object in the constructor, and could for example either be created by the user if needed, eg

GraphDrawer graphDrawer = new GraphDrawer(shapeDrawer);
graphDrawer.drawGraph(...);

or created internally by ShapeDrawer and be used via eg

shapeDrawer.graphs.drawGraph(...)

Another alternative would be static methods eg GraphDrawer.drawGraph(shapeDrawer, ...) instead of putting them into a drawer object, though I think that makes less sense.

In any case, I'm always happy for more contributions and content, and the only thing I'm wary of is adding methods that aren't directly related to drawing elementary shapes to the ShapeDrawer class. If you like you can float some ideas here when you think of them.

from shapedrawer.

raeleus avatar raeleus commented on July 28, 2024

That's an excellent idea! It's bound to get pretty messy, so thankfully you told me about that first. Okay, I'll work on a PR. I hope to do the idea justice!

from shapedrawer.

raeleus avatar raeleus commented on July 28, 2024

See pull request #20

from shapedrawer.

Related Issues (20)

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.