Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Saturday, April 21, 2012

JavaScript Pathfinder


If you would like to immerge in A* algorithm (A-star), this page is has a wonderful visual approach:

And this is worth checking out as well:
Very easy way to understand A-star path finding algorithm with Manhattan, Chebyshev and Euclidean distance.
(All those you can try out with the Javascript version.)

Tuesday, October 13, 2009

Image recognition with java tool


Neuroph is an opensource tool collection for java, and as you can get from its name, it uses neural networks. In the future, we may use it in one of our sideprojects.
Here is an online demo:
You can get an overview here:
Of course the source code is available, and it's worth checking, if you're really into neural networks.

Thursday, September 17, 2009

Rome built in a day


Okay, this is just uebercool, but I couldn't find any information about the precision of these models.
They look nice, anyway.

Saturday, September 12, 2009

Logo II.


This is my next try:
However, I'm not satisfied with that... I simply wanted to be it a little bit less linear, but now it looks falling apart. The double border around seems departed now.

Being short of time, I'll only upload the differences in the code.

Now I'm using this line, to determine the difference horizontally:
int diffWidth = Math.min(i, width - i - 1)/2;
This implies, that the gradient will be somewhat smaller horizontally than vertically. (Half of it..)
A small problem with this is, that it doubles width of the vertical borderlines. I'll fix that next week, it's not that cool now.

The other change was, the nonlinearity.

Instead of the modulo function, now I'm using a whole new function to determine, what heights will be grey:
if(isGrey(diffMin)) grey = true;
which is equal to:
grey = isGrey(diffMin);

And the function is:
public static boolean isGrey(int diff)
{
int counter = 6;
int sum = counter;
while(sum <= diff)
{
if(sum == diff)return true;
counter+=4;
sum += counter;
}
return false;
}

Well, the small problem with this is, that it computes every possible height every time. It's not a big deal, since it runs in a few milliseconds, but it would be faster, if I first create a HashSet of integer values, put in the first few values (in this case: 6, 13, 21, 30, 40, 51, 62, ...), and search in that HashSet every time. Maybe I'll do that later.
(However, that would be better even because I could set the heights of the lines manually, without writing an algorithm. For such a small application it would be maybe better.)

Okay, that's it for now, I'll come with a new logo next week.

Tuesday, September 1, 2009

Graph visualisation


Not really on-topic, but I've been always interested in graph theory:
(its a pdf!)(It's about a new method to visualise large graphs, as you can see above.)

Wednesday, November 26, 2008

sincx

Just created this image for testing some edge detection algorithms:

And, if I'm there already, I will check out some image processing techniques using the sinc function. ( sin(x)/x )
These kind of images should fit perfectly for that purpose, cause they have information in the frequency domain.




Monday, November 10, 2008

Newton-Leibniz

Found this valueable piece of street art today:


Or should I call it street science?