VisPy is quite an interesting tool. They say it is for “scientific visualization”. Here is an example of that. I took a demo from their github page and added a little code to generate a sinewave. The cool thing is that the graph, scaling, panning, zooming, and redrawing all come out of the box.
I previously wrote about installing VisPy. Thanks to the great efforts of some unnamed people, Python on Windows is really working nicely now.
Here is a screenshot:
Here is the code:
VisPy is a Python library for interactive scientific visualization that is designed to be fast, scalable, and easy to use.
Here is how I installed it:
First I installed the latest Python 3.6 on Windows 10 by following the directions on http://www.python.org. Once this was installed, I opened up Windows PowerShell and ran this command:
py -m pip upgrade vispy PyQt5 --user
I found some sample code here, and using NotePad++, copied and pasted it, saving it to Desktop\Code\v1.py
In PowerShell, I changed to the directory that I saved the python code to and ran it:
Here is the output:
It’s a pretty smooth and clean looking UI. It seems extremely powerful, but I’ll need to dig in and see what makes it tick…
Here is an example of a moving 2D sine wave using Python 3, PyGame, and PyOpenGL. See a https://blog.gahooa.com/2018/02/11/pygame-and-opengl-on-windows-10/ for how to install them.
This sample program is designed to have a 100×60 unit working area with a 10 unit buffer around the edges. You can see the axis in the lower-left (0,0) where Y+ is up, and X+ is to the right.
The structure of the program was created to make it super easy to work on the “guts” of the graphics without getting it confused with the “bookkeeping” end of OpenGL or PyGame.
Note: the glOrtho() command is how 2D “parallel perspective” is setup. It defines the left, right, bottom, top, near plane, and far plane. Because it is parallel, there is not the notion of a “camera” per-se, but rather section of the plane that should be viewed. Documented here:
Here is the code!
First I went to http://www.python.org and downloaded the latest version of Python for windows. I made sure to select the option to add it to the system path.
Then I opened windows PowerShell (just a nicer term)
py -m pip install pygame --user
py -m pip install numpy --user
py -m pip install pyopengl --user
(I also installed NoteTab++, a nice text editor)
From there, I went to github and copied one of the examples from https://github.com/pygame/pygame/blob/master/examples/glcube.py and saved it on my desktop as myglcube.py.
In PowerShell, you just type:
py -m myglcube
Here is my example:
(here is the code)
Using Adobe PhoneGap Build… ajax calls working fine in PhoneGap dev app, but not working once you build the app? Getting 404 errors when the server is not even being hit?
After much searching, this is what fixed it:
Remove browser plugin (in this case did not need/want it)
phonegap platform remove browser
Add the whitelist plugin:
cordova plugin add cordova-plugin-whitelist
Need advanced servo motors or drives for an upcoming project? Building a CNC machine? Just interested in learning a lot?
My experiences with their service has been outstanding. Will be receiving product soon and have to post more about that then.
http://www.dmm-tech.com/, a company that:
DMM Technology Corp. is devoted to the research and development of advanced servo motion control products. Within our 20 year history, we have achieved numerous patented technological advances in the automation industry and have integrated these technologies into our products. These achievements have allowed us to expand the limits of AC Servo application and have attributed our products with an unprecedented combination of performance, reliability, and cost.
All technology used in our products are developed by our in house engineers who utilize smart thinking and smart solutions to simplify the servo control mechanism while maintaining a high performance and full-featured product.
Our products have proven themselves in many manufacturing, and automation industries for worldwide applications. We are also able to collaborate with users to develop new, or modify existing systems in order to meet and exceed the target requirements. We integrate smart technology into an industry proven package.
Visit our Core Technology section to learn more about our technical specialty.
I had an incredible talk with Craft Pattern today, about making a custom cast iron machine frame.
They really took the time to talk me through the process and helped me understand the different techniques used.
Isn’t it great when you get to talk to someone who knows what they are talking about?
Have you considered cast iron as a possibility on any of your projects? I hadn’t until recently, but now a whole new world of possibility has opened up.
In addition to casting, they offer full CNC machining services on the castings, so it sounds like a one-stop-shop.