-
Notifications
You must be signed in to change notification settings - Fork 619
GSOC 2014 Application: Implementing Visuals Layer
Name: M S Suraj
E-mail: mssurajkaiga@gmail.com
Telephone: 91-7507164048
Time zone: UTC +05:30 (Indian Standard Time)
IRC: mssurajkaiga
Github: mssurajkaiga
Skype: mssurajkaiga
Twitter: mssuraj2010
Blog: http://www.mssuraj.in
I am a 3rd (pre-final) year undergraduate majoring in Electrical and Electronics Engineering at BITS Pilani, Goa campus in India. I have very good knowledge of C/C++ and have been programming in Python for past two years. My goal is to pursue research in Computer Graphics, particularly in realistic rendering and real-time rendering.
Implementing Visuals layer and related functionality in vispy
Vispy currently offers a Pythonic interface to OpenGL, gloo, which requires the knowledge of OpenGL and shaders. The next step towards achieving Vispy's primary goal, ie providing independence from OpenGL for the end-users, is the visuals layer. The visuals layer provides an abstraction layer over gloo and lets you create and modify visual objects on the scene with a Pythonic interface. The objective of this proposal is to implement high-priority visuals using the visuals architecture and related functionality for the same.
This is a rough sketch of the features I plan to implement and how I intend to implement them.
Visual
Each Visual will have the following features:
- Integration with vispy.color
- Clean pythonic interface
- For example, A green circle could be created by any of the following:
cv = CircleVisual(pos=(1,0,0), rad=3.0, color=(0,1,0,1))
cv = CircleVisual(pos=(1,0,0), rad=3.0, color=ColorArray('green'))
cv = CircleVisual(pos=np.array([1,0,0]), rad=3.0, color=ColorArray((0,1,0,1)))
Once created, the visuals can be easily modified as well.
cv.color(ColorArray('blue'))
will change it to blue colored circle.
- Extensible shader support
- Each graphic will be implement as efficiently as possible.
- Examples depicting functionality
- LineVisual
Implemented but further extension can be done
- Tessellation algorithm in vispy.geometry
Before implementing PolygonVisual, Delaunay triangulation will be ported from scipy.spatial.Delaunay into vispy.geometry.
- PolygonVisual
Parameters:
pos
: set of vertices representing the polygon to be rendered
color
: (R, G, B, A) or vispy.color.ColorArray object
border
: (size, style, color)PolygonVisual will require the use of tessellation algorithm to be provided by vispy.geometry.
- EllipseVisual
Parameters:
pos
: position
rad
: (x-radius, y-radius)
color
: (R, G, B, A) or vispy.color.ColorArray object
border
: (size, style, color)EllipseVisual will have two implementations -
- using PolygonVisual
- using PointsVisual
The default behavior is to choose the best suited implementation depending on the number of ellipses and the sizes to be rendered. The user can override the default behavior and explicitly use the implementation he/she desires.
- CircleVisual
Parameters:
pos
: position
rad
: radius
color
: (R, G, B, A) or vispy.color.ColorArray object
border
: (size, style, color)It will inherit from EllipseVisual but with only one value for x and y radii.
- MeshVisual
- TextVisual
Parameters:
pos
: position
font
: font-name
color
: (R, G, B, A) or vispy.color.ColorArray object
size
: font-sizeTextVisual will be implemented by rendering text to texture and displaying it using existing ImageVisual.
Pre-GSoC (till 21st April): |
Become more familiar with the code-base |
---|---|
Community Bonding Period (22nd April - 18th May): |
Read up on ideas and source-codes relevant to Visuals and discuss them with mentors. Also, code contributions would be low due to final exams, as mentioned in Other Schedule Information. |
Week 1 (19th May - 25th May): |
[Coding period starts] Working on issues pertaining to LineVisual. |
Week 2 and 3 (26th May - 8th June): |
Implementing tessellation algorithms in vispy.geometry either from scratch or port it from scipy.spatial or from CGAL. |
Week 4 and 5 (9th June - 22nd June): |
Implement PolygonVisual based on vispy.geometry package |
Mid-term Evaluation (23rd June - 27th June): |
Finish up on any left-over work and submit for evaluation. |
Week 6 and 7 (28th June - 11th July): |
Implementing EllipseVisual and CircleVisual |
Week 8 and 9 (12th July - 25th July): |
Work on MeshVisual implemented by Luke and create examples. |
Week 10 and 11 (26th July - 8th August): |
Implement TextVisual with font, color and size support. |
Week 12 (9th August - 15th August): |
Finish up left-over work and documentation |
Final Evaluation (18th August - 25th August): | |
Post GSoC (beyond 25th August): |
|
- https://github.com/vispy/vispy/pull/109
- https://github.com/vispy/vispy/pull/191, https://github.com/vispy/vispy/pull/190
I have my final semester exams from 2nd to 15th May and will be returning home on 16th May (midway Community Bonding Period). So during this period I won't be contributing much code, just lightly reading up relevant references and documentation. Apart from these I have my summer vacation till August 1st when my college reopens. As the first few weeks won't be heavy, I can contribute as per GSOC timeline.
http://cyrille.rossant.net/back-from-our-first-vispy-code-camp-at-esrf/
https://github.com/vispy/vispy/wiki/Tech.%20Visuals-and-scene-graph
https://github.com/vispy/vispy/issues/158
https://bitbucket.org/rndblnch/seagull/
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Basic_Shapes