SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Introduction to Accelerometers and
OpenGL ES on the iPhone
    Jon Liang
●


        Mobility Lead – Mobclix
    ●


        http://www.mobclix.com
    ●



    Jeff LaMarche
●


        Author - Beginning iPhone Development: Exploring
    ●

        the iPhone SDK
        http://iphonedevelopment.blogspot.com/
    ●
Introduction to Accelerometers and
OpenGL ES on the iPhone
    OpenGL ES
●


    Accelerometer
●


    More OpenGL
●
OpenGL ES 1.1 - Open Graphics Library for
Embedded Systems
OpenGL




         Source:http://www.cs.unc.edu/~walk/pap//fig1.gif
OpenGL (continued)

    Platform independent
●


    Input
●


        Points, Lines, Polygons
    ●


        Transforms
    ●


        Textures
    ●


        Transparency
    ●


        Lighting
    ●
OpenGL Pipeline




                  Source: Apple
Code: Hello World
Quartz 2D vs. OpenGL for 2D

    Quartz 2D
●


        Higher Level API
    ●


            Compatible with
        –
            CoreAnimation
            Easier to Display Text
        –

        Inverted y-axis
    ●



    OpenGL
●


        Low Level API
    ●


            More Control
        –                            Source: Apple


            Less Overhead
        –

        3D
    ●
iPhone Limitations

    24 MB of Memory for textures and surfaces.
●


    The maximum texture size is 1024 x 1024.
●


    2D texture targets are supported; other texture
●

    targets are not.
    Stencil buffers aren’t available.
●


    More Info:
●


           http://developer.apple.com/iphone/library/documentation/i
       –
           Phone/Conceptual/iPhoneOSProgrammingGuide/Graphi
           csandDrawing/chapter_6_section_5.html#//apple_ref/doc
           /uid/TP40007072-CH10-SW18
Open GL → OpenGL ES

    Removed glBegin() and glEnd()
●


        Use glDrawArrays() or glDrawElements()
    ●




    Added Fixed Point data types
●


        Embedded systems often don't have FPU's.
    ●




    Removed convenience functions
●


        More lightweight implementation.
    ●
Questions?
Accelerometer
Accelerometer

    Hardware
●


        3-Axis MEMS Accelerometer
    ●


            Part Number: LIS302DL
        –

            Max Sample Rate: 400 Hz
        –

            Max Acceleration: ± 8g
        –

        No Gyroscope
    ●



    Implications
●


        No Direct Angular Acceleration Data
    ●


        Zeroed at Free Fall
    ●


        Limited Amplitude (± 4g per axis)
    ●
Basic Tasks: Signal Processing

    Isolating Large Movements
●


        Low-Pass Filter:
    ●


        xn = xn-1/2 + x/2
    Isolating Small Movements
●


        High-Pass Filter:
    ●

        xn = x - xn-1




                            Sournce: http://jp.physoc.org/content/vol550/issue3/fulltext/873/Figures/HiRes/873-F2.gif
Basic Tasks: Ground Angle

    2 Dimensions:
●

    Θ = atan(y/x)
    Axis-Plane:
●


    Θ = atan(z/sqrt(x2+y2))




                          Source: http://www.forestgumpsays.com/wp-content/uploads/2008/03/3iphoneaxes.jpg
Basic Tasks: Simple Gestures

    Swipe
●

    Positive-Negative Spike

    Shake
●

    Oscillating Wave

    Rotations
●

    2-Axis Change
Classes
 UIAccelerometer                                    UIAcceleration

 Methods                                            Properties
     + sharedAccelerometer                             UIAccelerationValue x
 Properties                                            UIAccelerationValue y
     updateInterval                                    UIAccelerationValue z
     delegate                                          NSTimeInterval timestamp



           MyClass <UIAccelerationDelegate>

           Methods
              - (void) accelerometer:(UIAccelerometer*) accelerometer
                        didAccelerate:(UIAcceleration*) acceleration




                                                                 MyOtherClass
Code: Hello World (continued)
Questions?
More Open GL
Apple Sample Code

    Accelerometer Graph
●


    Crash Landing
●


    GLGravity
●


    GLPaint
●


    GLSprite
●


    Touchfighter II
●
Additional Resources

    Open GL
●


        http://www.khronos.org/opengles/sdk/1.1/docs/man/
    ●


        http://www.glprogramming.com/red/
    ●



    Accelerometer
●


        www.st.com/stonline/products/literature/ds/12726.p
    ●

        df
        http://squallchua.blogspot.com/2008/12/wiimote-gesture
    ●


        http://ifiddling.blogspot.com/2009/01/dummy2.html
    ●
Additional Resources (continued)

    Collision Models
●


        http://www.metanetsoftware.com/technique/tutorialA
    ●

        .html
        http://www.metanetsoftware.com/technique/tutorialB
    ●

        .html
        http://www.euclideanspace.com/physics/dynamics/c
    ●

        ollision/index.htm

Weitere ähnliche Inhalte

Andere mochten auch

Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignJohn Wilker
 
Mehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics DilemmasMehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics Dilemmasknowdiff
 
Coulomb Blockade Oscillations
Coulomb Blockade OscillationsCoulomb Blockade Oscillations
Coulomb Blockade OscillationsDeepak Rajput
 
Measuring the Surface Tension of Water by Light Diffraction on Capillary Waves
Measuring the Surface Tension of Water by Light Diffraction on Capillary WavesMeasuring the Surface Tension of Water by Light Diffraction on Capillary Waves
Measuring the Surface Tension of Water by Light Diffraction on Capillary WavesSEENET-MTP
 
A seminar report on Electric Propulsion
A seminar report on Electric PropulsionA seminar report on Electric Propulsion
A seminar report on Electric PropulsionSAKTI PRASAD MISHRA
 
Quantum computing seminar
Quantum computing seminarQuantum computing seminar
Quantum computing seminarPankaj Kumar
 

Andere mochten auch (6)

Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game Design
 
Mehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics DilemmasMehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics Dilemmas
 
Coulomb Blockade Oscillations
Coulomb Blockade OscillationsCoulomb Blockade Oscillations
Coulomb Blockade Oscillations
 
Measuring the Surface Tension of Water by Light Diffraction on Capillary Waves
Measuring the Surface Tension of Water by Light Diffraction on Capillary WavesMeasuring the Surface Tension of Water by Light Diffraction on Capillary Waves
Measuring the Surface Tension of Water by Light Diffraction on Capillary Waves
 
A seminar report on Electric Propulsion
A seminar report on Electric PropulsionA seminar report on Electric Propulsion
A seminar report on Electric Propulsion
 
Quantum computing seminar
Quantum computing seminarQuantum computing seminar
Quantum computing seminar
 

Ähnlich wie Accelerometer and Open GL

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webpjcozzi
 
Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin TechnicalMachine
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in actionStefano Sanna
 
Web Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfWeb Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfSamHoney6
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisC4Media
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at ScaleSean Zhong
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemMelissa Luster
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Massimo Oliviero
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsFlorian Weil
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logsStefan Krawczyk
 
Advanced JS Deobfuscation
Advanced JS DeobfuscationAdvanced JS Deobfuscation
Advanced JS DeobfuscationMinded Security
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLSharath Raj
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUGslandelle
 
Using CNTK's Python Interface for Deep LearningDave DeBarr -
Using CNTK's Python Interface for Deep LearningDave DeBarr - Using CNTK's Python Interface for Deep LearningDave DeBarr -
Using CNTK's Python Interface for Deep LearningDave DeBarr - PyData
 

Ähnlich wie Accelerometer and Open GL (20)

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
 
Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in action
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Web Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfWeb Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdf
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logs
 
Advanced JS Deobfuscation
Advanced JS DeobfuscationAdvanced JS Deobfuscation
Advanced JS Deobfuscation
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGL
 
MapReduce Algorithm Design
MapReduce Algorithm DesignMapReduce Algorithm Design
MapReduce Algorithm Design
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 
Using CNTK's Python Interface for Deep LearningDave DeBarr -
Using CNTK's Python Interface for Deep LearningDave DeBarr - Using CNTK's Python Interface for Deep LearningDave DeBarr -
Using CNTK's Python Interface for Deep LearningDave DeBarr -
 

Mehr von John Wilker

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11John Wilker
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2dJohn Wilker
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ESJohn Wilker
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.John Wilker
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...John Wilker
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentJohn Wilker
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your AppsJohn Wilker
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessJohn Wilker
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On RailsJohn Wilker
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeJohn Wilker
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core AnimationJohn Wilker
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer GamingJohn Wilker
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessJohn Wilker
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder BehindJohn Wilker
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchJohn Wilker
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGLJohn Wilker
 
Deep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkDeep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkJohn Wilker
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateJohn Wilker
 
From Flash to iPhone
From Flash to iPhoneFrom Flash to iPhone
From Flash to iPhoneJohn Wilker
 

Mehr von John Wilker (20)

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2d
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ES
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game Development
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your Apps
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application Responsiveness
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On Rails
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLime
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core Animation
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer Gaming
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve Responsiveness
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder Behind
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouch
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGL
 
Deep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkDeep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and Framework
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegate
 
Using SQLite
Using SQLiteUsing SQLite
Using SQLite
 
From Flash to iPhone
From Flash to iPhoneFrom Flash to iPhone
From Flash to iPhone
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Accelerometer and Open GL

  • 1. Introduction to Accelerometers and OpenGL ES on the iPhone Jon Liang ● Mobility Lead – Mobclix ● http://www.mobclix.com ● Jeff LaMarche ● Author - Beginning iPhone Development: Exploring ● the iPhone SDK http://iphonedevelopment.blogspot.com/ ●
  • 2. Introduction to Accelerometers and OpenGL ES on the iPhone OpenGL ES ● Accelerometer ● More OpenGL ●
  • 3. OpenGL ES 1.1 - Open Graphics Library for Embedded Systems
  • 4. OpenGL Source:http://www.cs.unc.edu/~walk/pap//fig1.gif
  • 5. OpenGL (continued) Platform independent ● Input ● Points, Lines, Polygons ● Transforms ● Textures ● Transparency ● Lighting ●
  • 6. OpenGL Pipeline Source: Apple
  • 8. Quartz 2D vs. OpenGL for 2D Quartz 2D ● Higher Level API ● Compatible with – CoreAnimation Easier to Display Text – Inverted y-axis ● OpenGL ● Low Level API ● More Control – Source: Apple Less Overhead – 3D ●
  • 9. iPhone Limitations 24 MB of Memory for textures and surfaces. ● The maximum texture size is 1024 x 1024. ● 2D texture targets are supported; other texture ● targets are not. Stencil buffers aren’t available. ● More Info: ● http://developer.apple.com/iphone/library/documentation/i – Phone/Conceptual/iPhoneOSProgrammingGuide/Graphi csandDrawing/chapter_6_section_5.html#//apple_ref/doc /uid/TP40007072-CH10-SW18
  • 10. Open GL → OpenGL ES Removed glBegin() and glEnd() ● Use glDrawArrays() or glDrawElements() ● Added Fixed Point data types ● Embedded systems often don't have FPU's. ● Removed convenience functions ● More lightweight implementation. ●
  • 13. Accelerometer Hardware ● 3-Axis MEMS Accelerometer ● Part Number: LIS302DL – Max Sample Rate: 400 Hz – Max Acceleration: ± 8g – No Gyroscope ● Implications ● No Direct Angular Acceleration Data ● Zeroed at Free Fall ● Limited Amplitude (± 4g per axis) ●
  • 14. Basic Tasks: Signal Processing Isolating Large Movements ● Low-Pass Filter: ● xn = xn-1/2 + x/2 Isolating Small Movements ● High-Pass Filter: ● xn = x - xn-1 Sournce: http://jp.physoc.org/content/vol550/issue3/fulltext/873/Figures/HiRes/873-F2.gif
  • 15. Basic Tasks: Ground Angle 2 Dimensions: ● Θ = atan(y/x) Axis-Plane: ● Θ = atan(z/sqrt(x2+y2)) Source: http://www.forestgumpsays.com/wp-content/uploads/2008/03/3iphoneaxes.jpg
  • 16. Basic Tasks: Simple Gestures Swipe ● Positive-Negative Spike Shake ● Oscillating Wave Rotations ● 2-Axis Change
  • 17. Classes UIAccelerometer UIAcceleration Methods Properties + sharedAccelerometer UIAccelerationValue x Properties UIAccelerationValue y updateInterval UIAccelerationValue z delegate NSTimeInterval timestamp MyClass <UIAccelerationDelegate> Methods - (void) accelerometer:(UIAccelerometer*) accelerometer didAccelerate:(UIAcceleration*) acceleration MyOtherClass
  • 18. Code: Hello World (continued)
  • 21. Apple Sample Code Accelerometer Graph ● Crash Landing ● GLGravity ● GLPaint ● GLSprite ● Touchfighter II ●
  • 22. Additional Resources Open GL ● http://www.khronos.org/opengles/sdk/1.1/docs/man/ ● http://www.glprogramming.com/red/ ● Accelerometer ● www.st.com/stonline/products/literature/ds/12726.p ● df http://squallchua.blogspot.com/2008/12/wiimote-gesture ● http://ifiddling.blogspot.com/2009/01/dummy2.html ●
  • 23. Additional Resources (continued) Collision Models ● http://www.metanetsoftware.com/technique/tutorialA ● .html http://www.metanetsoftware.com/technique/tutorialB ● .html http://www.euclideanspace.com/physics/dynamics/c ● ollision/index.htm