Looking for simple 3D Java lib [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 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

Related

2d collisions engine for irregular shapes formed with straight equations [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Contex: I'm trying to make a 2d physic engine, i'm starting to think about how to draw shapes that i could rotate. So i thought i could draw irregular shapes by drawing lines from several equations of straight. Now i have some doubts:
There is a easy way of draw a straight by giving an equation?
There is a library that can help me to handle equations?
The reason to use equations instead of using functions to draw lines from x1,y1 to x2,y2 is that i want the equations to calculate collisions between shapes.
Do you know a book or an article that could help me pull this off?
I'm gonna work in java, for now this is just an idea.
Not an expert in this field but quick search on java 2d engine collision engine returns dyn4j library on the first page. You can explore their examples and consequently the implementation code.
https://github.com/wnbittle/dyn4j

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.

Free / Open source java shapes library? [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 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

Object detection/tracking within 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 7 years ago.
Improve this question
I'm looking to do some image processing in Java and I'll be developing in Ubuntu with Eclipse.
So here is my objective:
From a greyscale image, I would like to be able to detect certain sized objects and draw a rectangular frame around them. However, the catch is that this image is captured from a thermal imaging camera so to detect body heat the pixels will have a value within a certain range.
After detecting all the objects in the image, I will need to count them, but that's later.
So here's my challenge. Which tools/apis/open classes can I use to do something like this. I looked around and found some basic manipulations such as rotate, crop, resize. But haven't really found anything I can use.
Where should I look/start?
thanks a lot in advance
ImageJ is very useful:
http://rsbweb.nih.gov/ij/
Although ImageJ is set up as a GUI, you can use it as a library too (I do that too)
You'll have to search for a proper object detection plugin (but there are some floating around...)
good luck!
Eelco
On this page you can find open-source tool for image processing and image mining:
http://spl.utko.feec.vutbr.cz/en/image-processing-extension-for-rapidminer-5
This article fully explains the algorithm you're looking for, and the accompanying source code is here. You can see it in action in this video.
(Disclaimer: I'm the author; but I do think this is very useful, and have successfully used the algorithm a lot myself.)
The algorithm tracks moving objects, finds their bounding rectangle (which the application draws), counts the number of pixels in each objects, correlates them throughout frames as the same object (with an int ID). You may need to do a trival conversion of your grayscale image to RGB (by copying the gray values to all three channels) since the algorithm was designed for color input.
When it comes to commercial computer vision applications, OpenCV and the Point Cloud Library aka PCL are your best friends. And articles like the one linked explains how to use tools like OpenCV to accomplish full stack motion tracking. (The pure Java implementation shows how it works down to the individual pixels.)

Categories

Resources