How do I create a spinning globe with points of interest for an iPhone app? [duplicate] - iphone

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Any one know of an OpenGL ES example of an interactive globe/earth for the iPhone
I'd like to build an app with a spinning 3d globe and a few points of interest on, which the user can interact with (zoom in, click on point of interest, turn and stop globe etc). I've seen an example of how to build a sphere using OpenGL ES and Cocos2d-iPhone (neither of which I have any experience with) but I wondered if this is the best approach, as both the examples I found seem to have no user interaction enabled.
What I would like is for someone to advise me the best way of building this? Should I use OpenGL ES or Cocos2d-iPhone or is there some other way that's better (considering I'd like the user to interact with it)?
I have the co-ordinates I need, but I'm unsure how I would even go about mapping them onto a sphere. Should I use a textured Image on the Globe? And then how would I go about adding the interaction>
Any advice would be really useful as I seem to be going round in circles with this (pardon the pun).
Thanks in advance!

Thanks Brad - eventually we found this link which provides the source - which is pretty cool (and free), so thought I should share:
http://www.scoop.it/t/ios-developing/p/628999997/whirlyglobe-for-ios

Related

Rendering a 3D object from four different angles

I am working on a project where I have to render 4 different sides of a 3D object at the same time on the screen. The output should have 4 different camera outputs rendering the front side, left side, right side and back side of the 3d object.
I found that a gaming engine like Unity may help to do something like this. However, I have just started using Unity and can't figure out how to do it.
Here is the link for some examples. This is how I want the output to look like
Well first of all, welcome to Stackoverflow. And you are right, Unity is an excellent IDE to achieve what you described.
As stated in the FAQ and here, I'm going to give you an answer I deem fitting to your question. I can post the code here in about 30 minutes which does exactly what you asked for, but then we'd miss the point of learning to program and posting at StackOverflow in general. I'll show you the way on how to start on this project, but then you'll have to try yourself. If you have any troubles after trying some more, we can help you with specific problems, provided you have researched some before and show us what you tried.
As to your question, it's relative easy to do so. First create your object in the scene, then drag and place four different Camera-objects in the screen. Using the Camera's Normalized View Port Rect (Four values that indicate where on the screen this camera view will be drawn, in Screen Coordinates (values 0-1)), you can then split up the view to show the feed of each Camera.
This ofcourse happens in a script. You can read here about Scripting in Unity. Even if you are an expert in programming, that link is worth a read when you are new to Unity.
Good luck.

Drawing tiles using UIImage or use buttons?

I'm new to IOS development, and want to create something with tiles similar to what you see here. http://www.youtube.com/watch?v=i7giaN5T7ww
Since I'm a beginner, I see myself placing a bunch of buttons on the screen and labeling them to how I see fit. Then figuring out how to move multiple "buttons" at once. I was wondering how you think the tiles are created in this program? If not done by a bunch of buttons, could someone show me code to draw a tile with dimensions of 48x48 pixels, then place a letter on the tile?
Also, if you could point me to some helpful resources that would help me develop something along the lines of a project like this, I would most appreciate it. I'm excited and very motivated to learn and master IOS development and consequently objective-c.
My knowledge is limited to what I've learned by watching and coding along to these two YouTube playlists:
http://www.youtube.com/user/thenewboston#p/c/640F44F1C97BA581
http://www.youtube.com/user/thenewboston#p/c/53038489615793F7
They've been extremely helpful in helping me understand the basics of Objective-C and Iphone development. Unfortunately, it didn't get into drawing and manipulating objects on the screen.
Thanks in advance for your help. I've found this site and its users quite helpful already. :)
I have kind of similar apps in the app store and I used in one case UILabels and in another case UIViews with UIImageViews as subviews. The movement of the labels I have implemented with the methods touchesBegan:withEvent, touchesMoved:withEvent and touchesEnded:withEvent.

Overlay "Structured Glas" Effect on iPhone Camera Feed - General Directions

I'm currently trying to write an app, that would be able to show the effects of glas, as seen through the iPhone Camera.
I'm not talking about simple, uniform glas but glass like this:
Now I already broke this into two problems:
1) Apply some Image Filter to the 2D-frames presented by the iPhone Camera. This has been done and seems possible, e.g. in the app: faceman
2) I need to get the individual lighting properties of a sheet of glas that my client supplies me with. Now basicly, there must be a way to read the information about how the glas distorts ands skews the image. I think It might be somehow possible to make a high-res picture of the plate of glasplate, laid on a checkerboard-image and somehow analyze this.
Now, I'm mostly searching for literature, weblinks on how you guys think I could start at 2. It doesn't need to be exact, in the end I just need something that looks approximately like the sheet of glass I want to show. And I'm don't even know where to search, Physics, Image Filtering or Comupational Photography books.
EDIT: I'm currently thinking, that one easy solution could be bump-mapping the texture on top of the camera-feed, I asked another question on this here.
You need to start with OpenGL. You want to effectively have a texture - similar to the one you've got above - displace the texture below it (the live camera view) to give the impression of depth and distortion. This is a 'non-trivial' problem, in that whilst it's a fairly standard problem in its field if you're coming from a background with no graphics or OpenGL experience you can expect a very steep learning curve.
So in short, the only way you can achieve this realistically on iOS is to use OpenGL, and that should be your starting point. Apple have a few guides on the matter, but you'll be better off looking elsewhere. There are some useful books such as the OpenGL ES 2.0 Programming Guide that can get you off on the right track, but where you start would depend on how comfortable you are with 3D graphics and C.
Just wanted to add that I solved this old answer using the refraction example in the Khronos OpenGl ES SDK.
Wrote a blog-entry with pictures about it :
simulating windows with refraction

Need help on graphic suite of choice for iOS development

I'm trying to play around with ios development and thought of a function that I'd like to achieve but don't yet know where to begin. In short, what I want to do is being able to draw lines with touch and then compare the drawn graphics with another image by pixels. I'm wondering what graphics suite should I use for drawing and comparing image functions? Thanks!
Quartz and Core Graphics are what you will need for pixel processing in iOS. I'm not positive if there are any open frameworks available that try to wrap some of this into friendlier usage, but i haven't used any. Here is a link to the Quartz2d document from Apple: Quartz 2D
As far as touch handling, there are a number of great tutorials to help with this. Try googling iphone touchesBegan.

OpenGL - to use or not to use ? why - iPhone application dev

I have to develop an application "Behavior like an Tetris game".
I have never used "OpenGL" for the iPhone application developement.
Application is something like this
Red / green / blue square boxes drop from top
Red + Red + Red = Points & boxes disappears
same way user has to make combination & get points
Different levels are there.
There are three buttons Left, Right for movement & bottom for speedy fall
For this kind of application should I use open GL or NOT?
i.e. Is it possible to develop entire application with view & it's animation?
If yes then, will it be more complex as compare to open gl?
What is the advantage of using open GL?
(I know that it gives good 2d, 3d look )
(But here my question means - easy coding?)
(Or open gl is more complicated as compare to objective-c?)
(I am just asking because I am not aware of it)
Basically your options are:
Using OpenGL
Using Quartz
Using UIKit
OpenGL is a fairly complicated beast, but is by far the best way to squeeze performance out of the iPhone. Do you need it for a Tetris game, though? Almost certainly not.
Quartz is the toolkit used in Mac OS X and the iPhone to draw images and do image effects. Because I come from an OpenGL background in other languages, I find Quartz strange and frustrating. However, it is probably easier for someone who is new to both.
You can do everything here using UIKit, and it will definitely be much much easier than other options. The main disadvantage is that it's rather slow in comparison, but once again doing a Tetris-like game shouldn't matter at all.
Before you go with UIKit, though, I recommend just checking out something like Cocos 2D, which will give you the advantages of OpenGL without the headache of dealing with all of its inner workings.
From the tone of your question it looks like you're confusing what OpenGL is and isn't with regard to Objective-C.
OpenGL is a library written in the C programming language (to put it simplistically) that excels at rendering shapes (especially 3D shapes) for display on a screen. It doesn't replace Objective-C inside your program, it merely assists you in drawing the shapes. If you don't use OpenGL, you'll need to write some sort of drawing/rendering code in your NSView (or subclass) to render the blocks. By using OpenGL, you will be provided a lot of helpful C methods for drawing shapes, which otherwise you'll have to implement yourself. On top of that OpenGL has thousands of man hours worth of drawing optimizations that you can take advantage of if you use it rather than trying to implement shape rendering yourself.
Having said that, OpenGL isn't all sunshine and roses. It works like a state machine and has its own assumptions about the way it will be used (like any API). Just because you know C and Objective-C doesn't mean that using OpenGL will be trivial. If you've never written any OpenGL code, I suggest you look into a reference like the venerable Red Book.
The thing to keep in mind is that OpenGL is not a language until itself (ignoring the OpenGL shading language). Its merely a set of C functions to aid you in rendering graphics.
You may well want to ask as well on http://iphonegamedev.stackexchange.com/, the new Stack Overflow variant just for iPhone gaming.
To learn & understand what you need.
Please go through following link.
it includes all necessary links for all kind of resources that you needed.
http://maniacdev.com/2009/04/8-great-resources-for-learning-iphone-opengl-es/
Edit :
After reading your question properly ( actually my question - By r & d I found solution).
I think - you need to develop a 2d application.
Go for the following link. Best option for 2d animation.
http://code.google.com/p/cocos2d-iphone/
Don't forget to visit following link, if you needed sample codes.
http://monoclestudios.com/cocos2d_whitepaper.html