I'm currently building a robot which solves a Rubik's Cube. I use an Android phone to scan the cube and I want to solve it in Android too. Is there a library which can solve a Rubik's Cube?
Thanks in advance
There is a VB 6.0 source code on this page: http://www.dutchthewiz.com/vb/games/
Porting the algorithm to Java will not be that difficult.
The problem comes in what type of cube you are doing? 2x2, 3x3, 4x4, 5x5 etc. Each of those will use the same algorithm to switch corners and edge pieces, however the trickier part will come with the center blocks.
http://www.wrongway.org/cube/solve.html is a good site to go to, you might be able to talk to the author about his algorithms.
http://www.swinburne.edu.au/ict/videos/media/Rubiks_cube_robot_480X270.html is another interesting site.
Don't be afraid to talk to people who have developed these ideas and solutions. They are sometimes willing to help you design yours.
Check out:
http://sourceforge.net/projects/rubikcube3x3pac/
Related
as it says, I've read online about Spine being imported over to LibGDX. I'm using Android Studio to develop a game and using the LibGDX framework. But my game requires 2D rigged animation than the pre-rendered models so I'm using Spriter Pro. But I want to know how do I import what I make from Spriter Pro to LibGDX so I can use what I make from there to develop my game on the LibGDX framework.
and if anyone could elaborate, couldn't a 2d animation with lots of frames be just as efficient as a 2d rigged animation? I dont see the pros and cons for both, just that 2d animation could take up alot of time to make
This Library might work for you
I'm currently trying to implement this library in my own project but I'm still having strange problems as seen below:
problem
I hope it helps and please contact me if you get it implemented in libGDX without this problem.
edit: sorry Xoppa, did not see your comment
In addition o the already mentioned https://github.com/Trixt0r/spriter repository you may want to try out https://github.com/blueacorn/libgdx-spriter-demo for some simple ready-to-go implementations of the necessary loaders and drawers. The readme includes an easy tutorial for quick results.
I'm trying to calculate a ray in my 3D world from a tap on an Android phone screen.
I thought I could just take the projection*modelview transform and inverse it. However, getting hold of the actual matrices doesn't seem to be so straightforward as I expected in OpenGL ES.
After a good while searching around the internet, options seem to be:
Many people seem to be using a bunch of classes from an Android demo source (MatrixGrabber, MatrixTrackingGL..).
Use glGetFloatv. However this doesn't seem to exist in GL10. It seems to have been added in GL11 with some problems and with no documentation.
Implement your own matrix code.
Now it's almost two years since most of the stuff I've found was written and I find it hard to believe that google hasn't got around to make this easier for game developers on Android, so I'm assuming I'm just being blind. Is there an official or recommended way of doing this? Maybe something supported in the sdk?
Many thanks.
I am developing an application in android.In this application I want to find the shape of an object in a black and white snaps. If i have a triangular object in the snap then i want to find the angle between the edges of the objects programmatically. I do not want to draw the line manually on the object and find the angle. My actual need is that scan the image and find angle of the object using objects pixel intensity.
Can anyone please suggest me how to proceed for this work.
Thanks in advance.
The OpenCV library, which can be built for Android, can perform such shape detection. Here's a tutorial about triangle and other shapes detection. It shows how to extract vertices, from which you should be able to get angles easily. It's in C# but should be easy to port to C.
I don't think that you'll find a ready-to-use OpenCV Java binding for Android. But using the Android NDK, you could encapsulate calls to the OpenCV C API, and expose a few functions in Java through JNI. A google search about "opencv android java" yields a couple of tips.
Not really sure if this is a good solution for a mobile device, but it sounds like you should use a Hough transform to find the lines, and then find a triangle using those lines.
It sounds like you need to use some Edge detection, Which is what Hough transform is part of. There are many different complex approaches to this process, but this is definitely a starting point to read up on.
I got three breakout boards form spark fun.
and i wanted to test them out.
something that i can visualize like a moving graph.
do you have any suggested links or anything I can reference?
suggestions are greatly appreciated!
. i just want to have something simple like a line just going across on a graph
similar to this to test them :)
Best video codec to encode analog graph information / AVI
Umm, a graph of what exactly? I would suggest instead you grab a few LEDs and play with making them turn on/blink as your first project.
That would depend on which UI toolkit you are using (AWT, Swing, SWT). For SWT, you may want to look at SWTChart.
I have also used JFreeChart with good success.
I'm writing a time management application and I have an idea for presenting timelines and todo items in 3D. Visually, I imagine this as looking down a corridor or highway in 3D, with upcoming deadlines and tasks represented as signposts - more important items are larger and upcoming deadlines are nearer.
I want to do this in Java, however I have no idea how to begin. For example, I would like to be able to render text and 2D graphics (dates, calendars etc) on the floor/walls of the corridoor, as well as on task items. The tasks themselves could be simple blocks. However examples of 3D code I have seen all look to operate on a very low level, and what I can't figure out are the appropriate co-ordinates to be using, or how the user would be able to interact with the view by selecting items with the mouse (for example clicking an expand or info button to get/edit task properties with the usual swing components).
Is there any higher level API I could be using, or example code that does this sort of thing? Any other ideas for how best to approach this problem?
edit: removed Java3D requirement - I just need to do this in Java.
To be perfectly honest, most "clever" user interfaces are ineffective for a number of reasons:
They favor complexity (for the sake of coolness) over simplicity and usability.
They are likely to be totally unfamiliar to the user.
You have to implement them yourself without some library having done the hard work for you.
I think the interface you describe runs the risk of falling into this trap. What's wrong with the current interface? Won't it be really hard to get an overview due to foreground stuff getting in the way? Now of course you could take it a step further and zoom out/rotate to get an overview but that complicates things.
Having said all that, if you can make it easy to use and really slick, then it can make an application. Users will have a lower tolerance for failure in "fancy" UIs, so perhaps this isn't the best first 3D project.
I do think there is a need for more examples geared towards visualisation rather than games.
To be honest, having tried both, if you use JOGL instead you'll find there's tonnes of OpenGL examples to copy that sort of thing from, and you won't have to code around the limits of the scene graph Java3D gives you. I tried Java3D a couple of years ago in a simple wireframe viewer, and it was such a pain to get the camera control right and the rendering anywhere near OK that I gave up on it.
I've found Pro Java 6 3D Game Development to contain very good code examples.
Here's a code example of 3D text, from NeHe Productions!, check the "DOWNLOAD Java Code" and "DOWNLOAD JoGL Code" at the end of the example.
On a side-note, I was very impressed with LWJGL which makes you write in a very similar way to straight-forward OpenGL.