Scientific Algorithms that can produce imagery, pseudocode perhaps? - math

I have a client who is based in the field of mathematics. We are developing, amongst other things, a website. I like to create a mock-up of a drawing tool that can produce some imagery in the background based on some scientific algorithms. The intention being that the client, later, may create their own. (They use emacs for everything, great client.)
I'm looking for an answer about where or what to search. Not code specific, pseudocode even, as we can adapt and have not yet settled on a platform.
I'm afraid my mathematics stops at the power of two and some trigonometry. Appreciated if they're are any mathematics related students/academics how could enlighten me? What to search for will be accepted?
Edit: To summarise/clarify, I want to draw pretty pictures (the design perspective). I want them to have some context (i.e. not just for the sake of pretty images but have some explanation available). In essence I would to create a rendering engine which they can draw/code the images and we set the style parameters: line, colour, etc... But to pursue this option I want to experiment myself.
Edit: great responses thanks. The aim is to make something along the lines of http://hascanvas.com/ if anyone is interested.
Thanks
Ross

Mandelbrot set, Julia sets, random graphs, Lorenz attractor.
Maybe minimising energy functions on a sphere.

I'm quite sure that I don't fully understand what you are after, so to provoke you and others into clarifying, I suggest you grab a copy of Mathematica and of Web Mathematica and knock your clients out with that.

Mandelbulb.

Fractals with pseudo code.

You can have a look at these links:
https://mathshistory.st-andrews.ac.uk/Curves/
https://www.nctm.org/classroomresources/
https://planetmath.org/famouscurves

Related

Graph data structure visualization

Hello I have got an assignment to write a program, which will visualize a Graph, implemented in any way. I have no problem in implementing Graph, but I have no idea how can I visualize it.
The rules are:
- include graphs with vertex and edge labels, directed and non-directed;
- drawing clarity (avoiding large clusters of vertices and edges, avoiding cutting edges and breaking them in many places)
Do you have any tips or suggestions which language or tool should I use to do it, or when can I find help to deal with this type of problem, I'd be glad. I don't know how to make anything graphic, never done that. I am coding mostly in Java, Python and C++, but I am not advanced.
I am working on a similar problem. The approach I'm working with currently has been first creating a node, then animating it, and repeating for all nodes
https://dl1683.github.io/DataStructuresInJavaScript/index.html.
The Github code might be useful to you. I am not a web dev guy so be careful about doing everything I did.

How to generate recursive shapes like geokone.net using GL.Begin?

http://app.geokone.net/ is an open source javascript app for generating shapes (if you can look at it, it's really fast, for 5 seconds, I'm sure you'll get the idea).
It's hard for me to go through it because it's a lot of code, what is the general idea?
also, I need those shapes as GameObject with polygon collider around them (anything from 0 to 20 of them on the screen at the same time, could be different shapes also), is it even possible with GL?
would GL help me? I think GL would be fast for just 1 shape or something (as it's using recursion), but for what I want, I think drawing them in real time to a texture, then using the texture as a sprite would be faster (as I can save the sprite for shapes that are the same), or maybe I should use a shader? any other method that you can think of?
and for the algorithm itself, what is the general idea?
You don't want to use GL, look into custom mesh generation with MeshFilter. It is required for the colliders anyway.
Meshes have to be updated just once and probably will be faster than any optimisation you proposed. You might need a shader to draw it, though.
As for the algorithm, I'm afraid you have to look into it yourself or hire someone for it. StackOverflow is for helping with issues, not doing the work for you. If you need a hint, look into basic fractals

Do you know a good program to draw DVCS graphs?

Recently I was trying to introduce improvements to a DVCS workflow in the company I work for. To make it happen I need to write a document describing the changes - cause it's for managers - the more pictures / graphs the better.
Do you know any program (for Windows preferably) in which it's easy to draw graphs representing branches, commits and merges? I've tried Visio but it's not exactly what I expected (or maybe I just need new stencils).
EDIT: The result I would like to accomplish is similar to this one: http://nvie.com/posts/a-successful-git-branching-model/ The author didn't answer to the questions about the software used in the comment's though.
You can try this online tool http://www.lucidchart.com, although it is not the same one.
I can recomment yEd from yFiles. It is free and can produce some beautiful graphs for a fairly wide array of use cases. It does have some relatively minor foibles, but it gets the job done more than it gets in my way.

How To: Pattern Recognition

I'm interested in learning more about pattern recognition. I know that's somewhat of a broad field, so I'll list some specific types of problems I would like to learn to deal with:
Finding patterns in a seemingly random set of bytes.
Recognizing known shapes (such as circles and squares) in images.
Noticing movement patterns given a stream of positions (Vector3)
This is a new area of experimentation for me personally, and to be honest, I simply don't know where to start :-) I'm obviously not looking for the answers to be provided to me on a silver platter, but some search terms and/or online resources where I can start to acquaint myself with the concepts of the above problem domains would be awesome.
Thanks!
ps: For extra credit, if said resources provide code examples/discussion in C# would be grand :-) but doesn't need to be
Hidden Markov Models are a great place to look, as well as Artificial Neural Networks.
Edit: You could take a look at NeuronDotNet, it's open source and you could poke around the code.
Edit 2: You can also take a look at ITK, it's also open source and implements a lot of these types of algorithms.
Edit 3: Here's a pretty good intro to neural nets. It covers a lot of the basics and includes source code (albeit in C++). He implemented an unsupervised learning algorithm, I think you may be looking for a supervised backpropagation algorithm to train your network.
Edit 4: Another good intro, avoids really heavy math, but provides references to a lot of that detail at the bottom, if you want to dig into it. Includes pseudo-code, good diagrams, and a lengthy description of backpropagation.
This is kind of like saying "I'd like to learn more about electronics.. anyone tell me where to start?" Pattern Recognition is a whole field - there are hundreds, if not thousands of books out there, and any university has at least several (probably 10 or more) courses at the grad level on this. There are numerous journals dedicated to this as well, that have been publishing for decades ... conferences ..
You might start with the wikipedia.
http://en.wikipedia.org/wiki/Pattern_recognition
This is kind of an old question, but it's relevant so I figured I'd post it here :-) Stanford began offering an online Machine Learning class here - http://www.ml-class.org
OpenCV has some functions for pattern recognition in images.
You might want to look at this :http://opencv.willowgarage.com/documentation/pattern_recognition.html. (broken link: closest thing in the new doc is http://opencv.willowgarage.com/documentation/cpp/ml__machine_learning.html, although it is no longer what I'd call helpful documentation for a beginner - see other answers)
However, I also recommend starting with Matlab because openCV is not intuitive to use.
Lot of useful links on this page on computer vision related pattern recognition. Some of the links seem to be broken now but you may find it useful.
I am not an expert on this, but reading about Hidden Markov Models is a good way to start.
Beware false patterns! For any decently large data set you will find subsets that appear to have pattern, even if it is a data set of coin flips. No good process for pattern recognition should be without statistical techniques to assess confidence that the detected patterns are real. When possible, run your algorithms on random data to see what patterns they detect. These experiments will give you a baseline for the strength of a pattern that can be found in random (a.k.a "null") data. This kind of technique can help you assess the "false discovery rate" for your findings.
learning pattern-recoginition is easier in matlab..
there are several examples and there are functions to use.
it is good for the understanding concepts and experiments...
I would recommend starting with some MATLAB toolbox. MATLAB is an especially convenient place to start playing around with stuff like this due to its interactive console. A nice toolbox I personally used and really liked is PRTools (http://prtools.org); they have an implementation of pretty much every pattern recognition tool and also some other machine learning tools (Neural Networks, etc.). But the nice thing about MATLAB is that there are many other toolboxes as well you can try out (there is even a proprietary toolbox from Mathworks)
Whenever you feel comfortable enough with the different tools (and found out which classifier is perfomring best for you problem), you can start thinking about implementing the machine learning in a different application.

Generating a picture/graphic of a graph

In working on a shortest path algorithm across a network I would like to generate a picture of the network. I'd like to represent nodes (circles), links (lines), cost to traverse the link (number in the middle of the link line), and capacity of the link (number on the link line next to the node it represents) in the picture. Is there any library/software out there that would help to automate creating this picture?
I can do this manually in Visio or with some drawing application but I'd like to generate them from code as I change/tweak the network.
Sounds like a job for GraphViz , it generates graphs from a short text description file. I've used it to produce connected node graphs and I believe it should be possible to add link labels, as you require.
If you're using python, Nodebox draws pretty graphs.
One of the big problems in displaying networks like this is figuring out where to put the nodes on the display screen. If arranging nodes is logically simple given your network, then an off-the-shelf product is likely to suit your needs.
If the arrangements are much more complicated, you may have to accept a certain amount of manual intervention to get this to work with off-the-shelf stuff, or byte the bullet and program the whole thing yourself.
.NET is one choice, and once you've mastered the Graphics class it's easy to use and plenty fast for something like this. However, there are probably better languages/platforms than .NET for something graphics-oriented like this.
Update: .NET is much better for 2D graphics than I knew. The key is finding a fast workaround to the pitifully slow GetPixel() and SetPixel() methods in the Bitmap class. Once you can read and write individual pixels easily and quickly, you can do whatever you want as a programmer.
Did you by chance check out the R programming language? I'm not positive but I believe that you can make images and such out of graphs. r-project.org
There are a bunch of visualizations of various algorithms here: Algorithmics Animation Workshop

Resources