Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
0 answers
363 views

Animation of an incremental rotary encoder

While reworking my teaching materials for an exercise of an introductory course on mobile robotics, I recently created a animation/simulation of an incremental rotary encoder, e.g. often used for ...
AlexV's user avatar
  • 7,353
14 votes
1 answer
12k views

Farthest point algorithm in Python

I am learning Python and I tried to do a program to find K points from a set of N points, farthest as much as possible (I'm not ...
Sigur's user avatar
  • 307
5 votes
1 answer
9k views

matplotlib get_legend_handles_labels always return empty

I have a problem when adding elements to the same figure. The problem is with the legend. At each iteration I add elements and the corresponding legend. But I want the legend to include all the ...
Yochai's user avatar
  • 51
2 votes
1 answer
864 views

Estimating Pi with random darts on dartboard - high complexity issues

I've been trying to write nice snippet of code to simulate pi estimation by randomly throwing darts on a dartboard. While running the following code on high but reasonable numbers my mac doesn't plot. ...
oba2311's user avatar
  • 197
3 votes
2 answers
953 views

Real time graph simulation of dice tossing

When tossing a dice many many time all numbers tend to appear the same number of times, but if the number of throws is small then some numbers may appear more or less often than others, even ...
Caridorc's user avatar
  • 28.1k
15 votes
1 answer
1k views

Racetrack plotter

My Racetrack is just that. A Racetrack. You can't race it (yet) because I had trouble with collision detection, but I wanted to share it anyway. It creates a base polygon by using ...
Mast's user avatar
  • 13.8k
3 votes
1 answer
2k views

Drawing a cloud of points

I decided that it would be nice to write some code to draw a cloud of points. Of course my first thought was to draw some random points but the result is not cloud-ish, it is well... random. In the ...
Caridorc's user avatar
  • 28.1k
10 votes
1 answer
323 views

Visualize Parts of Song as Analyzed by Echonest

This is the a bit of code that works with Echonest API's pyechonest and remix libraries combined with matplotlib.pyplot to offer a simple visual representation of the start and end "parts" of a music ...
MikeiLL's user avatar
  • 640