Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8106969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:37:29+00:00 2026-06-06T00:37:29+00:00

In my iOS app, I do a ton of trigonometric calculations based on a

  • 0

In my iOS app, I do a ton of trigonometric calculations based on a given point (specified by CGPoint) and then create some transformation matrices based on those calculations to finally be used in an OpenGL drawing (via GLKit). I’d like to create an animation by changing that fundamental CGPoint over time, but I’m not sure what approach I should use for the animation.

What I’m really looking for is an API that allows me to specify a function to be called on each iteration, much like NSTimer does, but it’d be really cool if I could take advantage ease in/out, etc. The only piece of data that needs to be modified each iteration is my main CGPoint, and the rest of the rendering can be determined from that.

Approaches I’ve considered, but abandoned:

  1. Core Animation: I’m using OpenGL to draw, so Core Animation doesn’t seem to help.

  2. NSTimer: This doesn’t give me the flexibility of bezier curves and seems very manual.

  3. Heartbeat based on a given framerate: I only need to re-render when the point changes, and most of the time it is stationary. Doesn’t feel like a heartbeat is the right approach.

Does something exist like what I’m describing? Do I have to write it myself? Or am I just misunderstanding the tools provided for me which suggests I should take another look at how I’m drawing my graphics?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:37:32+00:00Added an answer on June 6, 2026 at 12:37 am

    I agree with the other poster. Assuming you can use iOS 5, you should use GLKView and GLKViewController. That’s set up to call you once per screen refresh (using a CADisplayLink internally .) If you don’t want to be iOS 5 only, you can set up a CADisplayLink yourself.

    Core Animation isn’t useful for OpenGL rendering. However, you can use the design of Core Animation to drive your design. Core Animation (like the rest of Cocoa) is build on top of OpenGL, so you can do everything CA does yourself. It just takes work. (sometimes a LOT of work.)

    Core Animation use a motion-based, not a frame based, animation model. Each time it renders the scene, it decides how much motion should be applied based on the elapsed time since the beginning of the animation. If it gets behind in rendering frames, the next frame moves further, so the motion over time is consistent.

    As far as ease in/ease out timing, you can do that yourself too. You’d need to read up on animation timing. It uses a non-linear mapping of input time to output time, using bezier curves to change the shape of the curve at the beginning and the end.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iOS app sending requests to a PHP based web service ,
I am developing an iOS app with a UITableView which at some stage adds
I have an iOS app that some customers are saying won't load, and they
My iOS app is showing the contents of a user's address book with some
My iOS app downloads some images from the internet and displays them on the
My iOS app is navigation-based with the following structure: @interface ViewControllerA : UIViewController @property
We have an iOS app that suffers performance problems -- long transaction times. Some
My iOS app sends MIDI bank and program changes to other devices using PGMidi
The iOS app Display Recorder claims to be able to record the screen of
My iOS app is randomly crashing but I don't get any warning/error in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.