Giter VIP home page Giter VIP logo

mechanism's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mechanism's Issues

[Refactor] Allow both solving and animation

It currently appears that the same Mechanism object cannot support both calculate() and iterate() operations simultaneously -- Mechanism.pos is assumed to be unchanging (or at least always of the same type). It would be helpful if the class object itself left the independent variables unspecified, so that the same object could be used to solve for multiple specific configurations, or looped to make an animation / result table, and so on back and forth.

example proposed use case:

  • Define joints, links, loop function
  • Create Mechanism object
  • Calculate configuration for input = (0, 0)
  • Animate configurations for input = (linspace(0,1,10), 0)
  • Animate configurations for input = (0, linspace(0,2*pi,50))
  • Calculate configuration for input = (0.5, pi/2)
  • ... (etc)

(This may also help with some DRY -- the iterate code could call calculate() rather than doing its own math)

Specifying initial positions of joints in linkage mechanism?

Hi,
I was wondering if it is currently possible to specify the joints' initial positions (preferably as cartesian coordinates) in a linkage prior to iterating/generating a path of motion?

For example, in the below code snippet:

from mechanism import *
import numpy as np
import matplotlib.pyplot as plt

# Declare the joints that make up the system.
O, A, B, C = get_joints('O A B C')

# Declare the vectors and keep in mind that angles are in radians and start from the positive x-axis.
a = Vector((O, A), r=5)
b = Vector((A, B), r=8)
c = Vector((O, C), r=8, theta=0, style='ground')
d = Vector((C, B), r=9)

Is it possible to specify initial joint positions that would then get used by the mechanism object?

Also, thank you for your great contribution! It's really modular and readable ๐Ÿ‘

How to specify angle of a link solid to another link

In example of four bar linkage, link e is integral with link c and sits at a fixed angle with respect to it. I cannot find anything in the code to govern such behaviour.

Is it possible in general to specify for link a link:

  1. which link to be integral with?
  2. at what angle with respect to such link to sit at?

How to calculate a variable lenght on a bar?

Hello.
I have a variable lengh on a bar due to a linear actuator, the triangle vector has 3 points (A B C), where A and C are blocked, B its the unknown position. How do you configure the script?, thank you so much and congratulations for the contribution.

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.