Free / Open source java shapes library? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I search for Java free open source shapes library,
That contains shapes like: Triangle, circle, Square, Polygon and etc'.
Of course it's should be graphics and not textual (terminal \ cmd).
Do you know about good one? Thank you.

Check out two particular ones (if you're still looking) the MyroJAVA program- this one is really designed for robots, but surprisingly has some pretty good Graphics library. http://wiki.roboteducation.org/Myro_in_Java
Also this library from Williams College: http://eventfuljava.cs.williams.edu/library.html

That contains shapes like: Triangle, circle, Square, Polygon and etc'.
With exception to triangle, the Java Graphics API already contains all theses, and to be honest, triangle wouldn't be that hard to implement (it's a closed polygon with 3 points after all)
I'd start by reading through 2D Graphics, in particular Working with Geometry

Related

scipy linkage (cluster) function equivalient in java/scala [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a library in java or scala which can do the same clustering like scipy's linkage does.
Performs hierarchical/agglomerative clustering.
The input y may be either a 1d compressed distance matrix or a 2d
array of observation vectors.
If y is a 1d compressed distance matrix, then y must be a (n2)(n2)
sized vector where n is the number of original observations paired in
the distance matrix. The behavior of this function is very similar to
the MATLAB linkage function.
The java libraries I have found (like jblas) are pretty low level lacking of higher order algoritms like linkage. On the other hand I am pretty sure there are some libraries doing that. Would be nice if you could pin point me to one or two.
PS One can find a lot of indviduals implementing some hierarchical clustering, I prefer something more trustable library like commons math if possible. But there I could only find k means clustering.
In the end I am using this library https://github.com/lbehnke/hierarchical-clustering-java
Its not heavyly maintained but passes the comparisment to python and matlab implementations.

How do I test overlap (or collision) of two arbitrary shapes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a Java library which I can use to compute the collision of two simple (no intersecting lines or holes) 2D polygons.
The specific implementation is a drag-and-drop "sticker" applicator where the user drags various solid shapes around the screen and the shapes may not overlap.
I have a vague idea of how to write this myself but am hoping to avoid reinventing this bicycle, however, after a number of searches I'm unable to find anything useful.
Box2D
Features
Rigid body physics
Stable stacking
Gravity
Fast persistent contact solver
Dynamic tree broadphase
Sliding friction
Boxes, circles, edges and polygons
Several joint types: distance, revolute, prismatic, pulley, gear, mouse
Motors
Sleeping (removes motionless bodies from simulation until touched)
Continuous collision detection (accurate solving of fast bodies)
Ray casts
Sensors
Serialization
Dynamic, Kinematic, and Static bodies
Liquid particle simulation from Google's LiquidFun

Diagram arranging algorithm [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need an algorithm or preferably a library, that will assist with arranging a diagram. I can already draw my diagrams, I just need arranging.
A diagram consists of one or more different sized rectangles, they may be connected. Some rectangles must have fixed positions, and the goal is to minimize total connection length. For example, this diagram where red squares have a fixed existing position, and where green squares should be positioned to minimize total connection length.
An optimal scenario is for me to input a graph, where nodes are rectangles and edges are connections. Nodes would have a certain size and possibly a fixed position. The output will be a set of XY coordinates.
I would like to know either an algorithm or library for such a task, thank you.
I have already looked briefly at JUNG and Graphviz, but I fail to see how they might solve my problem. Also, the final program will be an Eclipse plugin, so I would like to be able to easily bundle any external dependencies.

rotating BufferedImage with efficient angle in java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to rotate a BufferedImage from a math phrase so that become like this :
http://i.stack.imgur.com/ekP77.jpg
convert to :
http://i.stack.imgur.com/tYth1.jpg
we have not images and them include by user.
Minimize axis aligned bounding box area.
Simplest algorithm could do coarse estimation every 10 degrees. Pick best angle and do refinement with smaller angular step.
Probably you should pick wider rather than taller result.

Looking for simple 3D Java lib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Problem: I have to plot a simple 3D graph/diagram with x,y,z coordinates given for some points.
My goal is to export this 3D diagramm to svg -> I will have to make a projection as svg is not (yet) able to handle 3D.
So my input is a 3D diagramm with x,y,z coordinates and the output is a 2D view reduced to x,y coordinates.
Does anyone know a (preferrable small) java lib like
this one for javascript?
The projection might be just point3d to point2d. That is all I really need.
Thank you!
If all you need is something simple then I might say just write it yourself. If you don't need to move the camera you can assume a lot of the calculations zero out, and you can just do the following to get the 2d coordinate for any 3d point:
rect2d.x = rect3d.x / rect3d.z;
rect2d.y = rect3d.y / rect3d.z;
Doing that you can just simple take all of the 3d points that make up your polygon, and use the 2d points as your SVG primitive. The tricky part you're going to have to deal with is hidden surface removal, but that's not too hard. Shading is going to be your real problem, but maybe you can play around with gradients to emulate light.
Have a look at JFreeChart. Have a look at Batik for saving it to SVG

Categories

Resources