Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender Interface #13

Open
luca-heltai opened this issue Nov 24, 2014 · 2 comments
Open

Blender Interface #13

luca-heltai opened this issue Nov 24, 2014 · 2 comments

Comments

@luca-heltai
Copy link
Owner

A Blender interface

- given two files, containing numpy nd-arrays (as created by
   `numpy.save`), representing the time evolution of the position
   and shape, this interface should create an animation capable of
   visualising the time evolution of the object. We will need
   interfaces for the following objects

    - Golestanian Axis Swimmer (`m=1, n=2`)
    - Golestanian Plane Swimmer (`m=2, n=3`)
    - Golestanian Space Swimmer (`m=6, n=4`)
    - Axis crawler (`m=1, n=as many as you wish`)
    - Plane worm (`m=2, n=as many as you wish`)
    - Space worm (`m=6, n=as many as you wish`)
    - etc.
@lromor
Copy link
Contributor

lromor commented Dec 9, 2014

I would like to do this part.

@luca-heltai
Copy link
Owner Author

Ok. Start by creating a python class, called CompositeObject, initialized with m, n, ntimeframes or directly with two filenames.

The class should have the following functions:

read_shapes("filename")
read_positions("filename")

which read and store two numpy nd arrays from files (create two fake ones for the moment). Store the variables as object_shape and object_position. The ndarrays should have the following shape:

shape(swimmer_position) = (m, ntimeframes)
shape(swimmer_shape) = (n, ntimeframes)

the base class should have then a function (a virtual one)

pose_object(shape, position)

which, if called from within blender on a concrete class, would generate the object with the given shape and position. Start by considering a nurbs curve, with shape given by the control points.

I have some examples I can give you. More on thursday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants