I'm have a trouble with my project( at school). I need show how DFS, BFS,... work in Java and I decided to make it with JgraphX after watching this video: https://www.youtube.com/watch?v=oRR6VW5AIvM&t=7s . But this trouble is I couldn't find any documents except "JgraphX User Manual": https://jgraph.github.io/mxgraph/docs/manual_javavis.html , but it's seem a bit unclear. So
is there any way I can visualize the graph like the above video.
PS: I'm so sorry for my bad English if it make you read it difficultly.
Related
First of all hello everyone, this is my first post here. I am asking for your help, I'm designing a network topology for access points, but to make it more creative I want to do some coding on java. I want to code it using Graph data structure but what i may have a problem is like the following, i want to point some access points on the most frequent places. But whats the best algorithm to find the best places to put the AP's. Also is there any possible choice I could do double graph, one pair of graphs for people, and the other pair for AP's ? I would really appreciate your help cos I'm pretty lost here.
To simplify the problem, I have a graph that contains nodes and edges which are on a 2D plane.
What I want to be able to do is click a button and it make the automatically layout the graph to look clean. By that I mean minimal crossing of edges, nice space between nodes, maybe even represent the graph scale (weighted edges).
I know this is completely subjective of what is a clean looking graph, but does anyone know of an algorithm to start with, rather than reinventing the wheel?
Thanks.
You will find http://graphdrawing.org/ and this tutorial, by Roberto Tamassia, professor at Brown University, quite helpful.
I like a lot Force-Directed Techniques (pp. 66-72 in the tutorial) like the Spring Embedder.
You assume there is a spring or other force between any two adjacent nodes and let nature (simulation) do the work :)
I would suggest that you take a look at at graphviz. The dot program can take a specification of a graph and generate an image of the network for you somewhat "cleanly". I've linked to the "theory" page that gives you some links that might be relevant if you're interested in the theoretical background. The library and tools themselves are mature enough if you simply want a solution to a problem with layout that you're facing.
I would say as Noufal Ibrahim, but you could also look more precisely at the C API of the graphviz project. It includes a lib to build your graph (libgraph.pdf) with all the nodes and edges, and a lib to layout the graph (libgvc.pdf) (just compute each nodes position), so you can then display it in your own UI for example.
Also JGraph if you want the layouts in Java (I work on the project).
A good visual guide how the most popular layouts actually look: follow the link
I have been busy in the last couple of days designing and coding a voxel for Java.
My ultimate goal is to have a small game with a player who can move around and shoot things in a voxel-based world. Everything has been working great so far - I have gotten the voxel engine to work and to load a map saved in a simple XML format. However, I would like to be able to load .vxl maps from Ace of Spades (I believe it uses Voxlap).
I found this as a manual on how a .vxl is structured. However, how would I go about implementing something similiar in Java, instead of the C++ pseudo-code? I'm not asking for code, just for a direction on how to do something like that.
i was wondering if anyone has knowledge on the recontruction of 3D objects from live video feed. Does any have any java based examples or papers JAVA based that i could be linked to as i have read up on algorithm's used to produce such 3d objects. If possible i would like to construct something such as the program demostrated in the link provided below.
Currently my program logs live video feed.
http://www.youtube.com/watch?v=brkHE517vpo&feature=related
3D reconstruction of an object from a single point of view is not really possible. You have two basic alternatives: a) To have a stereo camera system capturing the object, b) To have only one camera, but rotating the object (so you will have different points of view of the object), like the one in the video. This is a basic concept related with epipolar geometry.
There are other alternatives, but more intrusive. Some time ago I've been working on a 3D scanner based on a single camera and a laser beam.
For this, I used OpenCV which is C++ code, but now I think there are ports for Java. Have in mind that 3D reconstruction is not an easy task, and the resulting app. will have to be largely parametrized to achieve good results.
This isn't a solved problem - certain techniques can do it to a certain degree under the right conditions. For example, the linked video shows a fairly simple flat-faced object being analysed while moving slowly under relatively even lighting conditions.
The effectiveness of such techniques can also be considerably improved if you can get a second (stereo vision) video feed.
But you are unlikely to get it to work for general video feeds. Problem such as uneven lighting, objects moving in front of the camera, fast motion, focus issues etc. make the problem extremely hard to solve. The best you can probably hope for is a partial reconstruction which can then be reviewed and manually edited to correct the inevitable mistakes.
JavaCV and related projects are probably the best resource if you want to explore further. But don't get your hopes too high for a magic out-of-the-box solution!
Is anyone developing robots and/or gadgets for Google Wave?
I have been a part of the sandbox development for a few days and I was interested in seeing what others have thought about the Google Wave APIs.
I was also wondering what everyone has been working on. Please share your opinions and comments!
I haven't tried the gadgets, but from the little I've looked at them, they seem pretty straight-forward. They're implemented in a template-ish way and you can easily keep states in them, allowing more complex things such as RSVP lists and even games.
Robots are what I'm most interested in, and well, all I can say is that they're really easy to develop! Like barely any effort at all! Heck, I'll code one for you right here:
import waveapi.events
import waveapi.robot
def OnBlipSubmitted(properties, context):
# Get the blip that was just submitted.
blip = context.GetBlipById(properties['blipId'])
# Respond to the blip (i.e. create a child blip)
blip.CreateChild().GetDocument().SetText('That\'s so funny!')
def OnRobotAdded(properties, context):
# Add a message to the end of the wavelet.
wavelet = context.GetRootWavelet()
wavelet.CreateBlip().GetDocument().SetText('Heeeeey everybody!')
if __name__ == '__main__':
# Register the robot.
bot = waveapi.robot.Robot(
'The Annoying Bot',
image_url='http://example.com/annoying-image.gif',
version='1.0',
profile_url='http://example.com/')
bot.RegisterHandler(waveapi.events.BLIP_SUBMITTED, OnBlipSubmitted)
bot.RegisterHandler(waveapi.events.WAVELET_SELF_ADDED, OnRobotAdded)
bot.Run()
Right now I'm working on a Google App Engine project that's going to be a collaborative text adventure game. For this game I made a bot that lets you play it on Wave. It uses Wave's threading of blips to let you branch the game at any point etc. For more info, have a look at the Google Code project page (scroll down a little bit for a screenshot.)
Go to Google Wave developers and read the blogs, forums and all your questions will be answered including a recent post for a gallery of Wave apps. You will also find other developers to play in the sandbox with.
I have been working on Gadgets, using the Wave API. It's pretty easy to work with. For the most part, you can use javascript inside an XML file. You just need to have the proper tags for the XML file. Below is a sample of what a Gadget would look like, this particular gadget retrieves the top headlines from Slashdot and displays them at the top of the Wave. You can learn more about Gadgets here and here.
alt text http://www.m1cr0sux0r.com/xml.jpg