SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Creating Custom Charts Using Ruby Vector Graphics (RVG) in Rails Apps By David Keener http://www.keenertech.com
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The Ruby Vector Graphics (RVG) API expands the capabilities of Ruby on Rails to include the dynamic creation of custom charts, drawings and graphics. By the end of this presentation, you will be able to answer the following questions about RVG and the astronomy-related demo application that uses it:
Why Do This in Rails? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Where Is RVG? ,[object Object],[object Object],[object Object],[object Object]
ImageMagick ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ImageMagick 6.3.3 is an open source software suite for image manipulation and display
GraphicsMagick ,[object Object],[object Object],[object Object],[object Object],[object Object],GraphicsMagick 1.1.7 is an open source software suite billed  as the “Swiss army knife of image manipulation”
RMagick ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RMagick 1.15.0 is a Ruby binding for the ImageMagick and GraphicsMagick APIs.
RMagick Basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ruby Vector Graphics (RVG) ,[object Object],[object Object],[object Object],[object Object]
What is SVG? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Key Components of an SVG Graphic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RVG and SVG ,[object Object],[object Object],[object Object]
Key RMagick / RVG Links ,[object Object],[object Object],[object Object],[object Object]
RMagick Pre-Installation Notes ,[object Object],[object Object],[object Object]
RMagick Installation - Windows ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RMagick Installation – Unix, Linux ,[object Object],[object Object],[object Object],[object Object],[object Object]
RMagick Installation – Mac OS X ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Onwards to the Demo Application! ,[object Object],[object Object],[object Object],The  Star Mapper  web application is targeted as an educational service to provide users with a 3D view of our local stellar geography.
NASA Starmap Outreach Project ,[object Object],[object Object],[object Object],[object Object]
NASA Starmap Outreach Project
Basic Stellar Data ,[object Object],[object Object],[object Object],If you’re going to create a starmap for the local stars, you need X-Y-Z coordinate data. Luckily, there are a number of free sources for stellar data:
X-Y-Z Coordinate Systems ,[object Object],[object Object],[object Object],Great. You’re gonna use an X-Y-Z coordinate system for your stars. Uh…which way is up?
 
Nearby Stars - Starmap ,[object Object],[object Object],[object Object],[object Object]
Basic Drawing With RVG ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Perspective Projection A perspective projection traces lines between a viewing point and elements in a 3D model in order to perform a 2D projection onto a screen. ,[object Object],[object Object]
Transformation Algorithm def  self.transform(pt, ptc) npt = {  :x  =>  0 . 0 ,  :y  =>  0 . 0 ,  :z  =>  0 . 0  } vdist =  4 . 0 d = ptc[ :z ] - pt[ :z ] if  d <  0 . 0 d =  0 . 0  - d end if  d <  1 npt[ :x ] = (pt[ :x ].to_f - ptc[ :x ].to_f) *  1000000 . 0 npt[ :y ] = (pt[ :y ].to_f - ptc[ :y ].to_f) *  1000000 . 0 npt[ :z ] =  1000000 . 0 else npt[ :x ] = (vdist * ((pt[ :x ].to_f * ptc[ :z ].to_f) - (ptc[ :x ].to_f * pt[ :z ].to_f))) / d npt[ :y ] = (vdist * ((pt[ :y ].to_f * ptc[ :z ].to_f) - (ptc[ :y ].to_f * pt[ :z ].to_f))) / d npt[ :z ] = pt[ :z ].to_f / d end npt  # Return a hash containing X-Y-Z coordinates for the transformed point end The transform method from the StarMap Model: pt   - A hash containing X-Y-Z coordinates for the point to be transformed ptc   - X-Y-Z coordinates for the reference point, sometimes referred to as the center of the projection
Summary ,[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

Real-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaReal-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaHideyuki Takeuchi
 
Extend R with Rcpp!!!
Extend R with Rcpp!!!Extend R with Rcpp!!!
Extend R with Rcpp!!!mickey24
 
Copy Your Favourite Nokia App with Qt
Copy Your Favourite Nokia App with QtCopy Your Favourite Nokia App with Qt
Copy Your Favourite Nokia App with Qtaccount inactive
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark Kilgard
 
Gazr
GazrGazr
Gazrkuro7
 
Embarrassingly Parallel Computation for Occlusion Culling
Embarrassingly Parallel Computation for Occlusion CullingEmbarrassingly Parallel Computation for Occlusion Culling
Embarrassingly Parallel Computation for Occlusion Cullingjasinb
 
Special Effects with Qt Graphics View
Special Effects with Qt Graphics ViewSpecial Effects with Qt Graphics View
Special Effects with Qt Graphics Viewaccount inactive
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Mark Kilgard
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsJussi Pohjolainen
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1NokiaAppForum
 
Introduction to open_gl_in_android
Introduction to open_gl_in_androidIntroduction to open_gl_in_android
Introduction to open_gl_in_androidtamillarasan
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android Arvind Devaraj
 
Animation Framework: A Step Towards Modern UIs
Animation Framework: A Step Towards Modern UIsAnimation Framework: A Step Towards Modern UIs
Animation Framework: A Step Towards Modern UIsaccount inactive
 

Was ist angesagt? (19)

Real-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaReal-Time 3D Programming in Scala
Real-Time 3D Programming in Scala
 
Extend R with Rcpp!!!
Extend R with Rcpp!!!Extend R with Rcpp!!!
Extend R with Rcpp!!!
 
Copy Your Favourite Nokia App with Qt
Copy Your Favourite Nokia App with QtCopy Your Favourite Nokia App with Qt
Copy Your Favourite Nokia App with Qt
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
JavaFX
JavaFXJavaFX
JavaFX
 
Gazr
GazrGazr
Gazr
 
Embarrassingly Parallel Computation for Occlusion Culling
Embarrassingly Parallel Computation for Occlusion CullingEmbarrassingly Parallel Computation for Occlusion Culling
Embarrassingly Parallel Computation for Occlusion Culling
 
Special Effects with Qt Graphics View
Special Effects with Qt Graphics ViewSpecial Effects with Qt Graphics View
Special Effects with Qt Graphics View
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
Interaksi obyek
Interaksi obyekInteraksi obyek
Interaksi obyek
 
The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and Slots
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
 
Introduction to open_gl_in_android
Introduction to open_gl_in_androidIntroduction to open_gl_in_android
Introduction to open_gl_in_android
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android
 
Animation Framework: A Step Towards Modern UIs
Animation Framework: A Step Towards Modern UIsAnimation Framework: A Step Towards Modern UIs
Animation Framework: A Step Towards Modern UIs
 

Andere mochten auch

Crafting the mobile experience
Crafting the mobile experienceCrafting the mobile experience
Crafting the mobile experienceRob Woodbridge
 
Ultimate Sound And Installations Presentation
Ultimate Sound And Installations PresentationUltimate Sound And Installations Presentation
Ultimate Sound And Installations Presentationultisound
 
Artikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran PerusahaanArtikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran PerusahaanTrisnadi Wijaya
 
Location location location
Location location locationLocation location location
Location location locationvladimirkleshnev
 
Containers virtaulization and docker
Containers virtaulization and dockerContainers virtaulization and docker
Containers virtaulization and dockerLuqman Shareef
 
Data Science in Cardiac Sciences
Data Science in Cardiac SciencesData Science in Cardiac Sciences
Data Science in Cardiac SciencesRobert Chen
 
Yankee Group White Paper Sip Trunking Uc
Yankee Group White Paper   Sip Trunking  UcYankee Group White Paper   Sip Trunking  Uc
Yankee Group White Paper Sip Trunking UcVintalk
 
Digital Trails Dave King 1 5 10 Part 2 D3
Digital Trails   Dave King   1 5 10   Part 2   D3Digital Trails   Dave King   1 5 10   Part 2   D3
Digital Trails Dave King 1 5 10 Part 2 D3Dave King
 
Protocolo De Entrega Do Planejamento
Protocolo De Entrega Do PlanejamentoProtocolo De Entrega Do Planejamento
Protocolo De Entrega Do Planejamentoguest4ec91e
 
Uniform Code of Pharmaceuticals Marketing Practices
Uniform Code of Pharmaceuticals Marketing PracticesUniform Code of Pharmaceuticals Marketing Practices
Uniform Code of Pharmaceuticals Marketing PracticesAnup Soans
 
Youth marketing: Irrational is new rational
Youth marketing: Irrational is new rationalYouth marketing: Irrational is new rational
Youth marketing: Irrational is new rationalAmit Singh
 
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting SpacesNEA
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On RailsDavid Keener
 

Andere mochten auch (20)

Crafting the mobile experience
Crafting the mobile experienceCrafting the mobile experience
Crafting the mobile experience
 
Ultimate Sound And Installations Presentation
Ultimate Sound And Installations PresentationUltimate Sound And Installations Presentation
Ultimate Sound And Installations Presentation
 
Re Shoot
Re ShootRe Shoot
Re Shoot
 
Giang Sinh1
Giang Sinh1Giang Sinh1
Giang Sinh1
 
Artikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran PerusahaanArtikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran Perusahaan
 
Location location location
Location location locationLocation location location
Location location location
 
Containers virtaulization and docker
Containers virtaulization and dockerContainers virtaulization and docker
Containers virtaulization and docker
 
Data Science in Cardiac Sciences
Data Science in Cardiac SciencesData Science in Cardiac Sciences
Data Science in Cardiac Sciences
 
Yankee Group White Paper Sip Trunking Uc
Yankee Group White Paper   Sip Trunking  UcYankee Group White Paper   Sip Trunking  Uc
Yankee Group White Paper Sip Trunking Uc
 
Comic Art
Comic ArtComic Art
Comic Art
 
Digital Trails Dave King 1 5 10 Part 2 D3
Digital Trails   Dave King   1 5 10   Part 2   D3Digital Trails   Dave King   1 5 10   Part 2   D3
Digital Trails Dave King 1 5 10 Part 2 D3
 
Protocolo De Entrega Do Planejamento
Protocolo De Entrega Do PlanejamentoProtocolo De Entrega Do Planejamento
Protocolo De Entrega Do Planejamento
 
Tradicii i legendi
Tradicii i legendiTradicii i legendi
Tradicii i legendi
 
Uniform Code of Pharmaceuticals Marketing Practices
Uniform Code of Pharmaceuticals Marketing PracticesUniform Code of Pharmaceuticals Marketing Practices
Uniform Code of Pharmaceuticals Marketing Practices
 
Youth marketing: Irrational is new rational
Youth marketing: Irrational is new rationalYouth marketing: Irrational is new rational
Youth marketing: Irrational is new rational
 
Flu Prevention and Self-Care at UNH
Flu Prevention and Self-Care at UNHFlu Prevention and Self-Care at UNH
Flu Prevention and Self-Care at UNH
 
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces
2010 Uni Serv Skills Session Meeting Potential Of Online Meeting Spaces
 
Smart Service@KKU Library
Smart Service@KKU LibrarySmart Service@KKU Library
Smart Service@KKU Library
 
Proyecto Fede
Proyecto FedeProyecto Fede
Proyecto Fede
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On Rails
 

Ähnlich wie Creating Custom Charts With Ruby Vector Graphics

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
 
Implementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererImplementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererDavide Pasca
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныTimur Safin
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202Mahmoud Samir Fayed
 
Building Browser VR Experience in React VR
Building Browser VR Experience in React VRBuilding Browser VR Experience in React VR
Building Browser VR Experience in React VRMarcin Mincer
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
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
 
The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196Mahmoud Samir Fayed
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docxdaniahendric
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
 
World wind java sdk in progess
World wind java sdk in progessWorld wind java sdk in progess
World wind java sdk in progessRaffaele de Amicis
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesRay Toal
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptJohn Stevenson
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciencesalexstorer
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable ShadingMark Kilgard
 
State of GeoServer 2.10
State of GeoServer 2.10State of GeoServer 2.10
State of GeoServer 2.10Jody Garnett
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
GL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdfGL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdfshaikhshehzad024
 

Ähnlich wie Creating Custom Charts With Ruby Vector Graphics (20)

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
 
pastel
pastelpastel
pastel
 
pastel
pastelpastel
pastel
 
Implementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererImplementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES renderer
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202
 
Building Browser VR Experience in React VR
Building Browser VR Experience in React VRBuilding Browser VR Experience in React VR
Building Browser VR Experience in React VR
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
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?
 
The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docx
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202
 
World wind java sdk in progess
World wind java sdk in progessWorld wind java sdk in progess
World wind java sdk in progess
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based Games
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
State of GeoServer 2.10
State of GeoServer 2.10State of GeoServer 2.10
State of GeoServer 2.10
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
GL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdfGL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdf
 

Mehr von David Keener

Writing Killer Fight Scenes
Writing Killer Fight ScenesWriting Killer Fight Scenes
Writing Killer Fight ScenesDavid Keener
 
Build a Space Battle
Build a Space BattleBuild a Space Battle
Build a Space BattleDavid Keener
 
Creating an Adaptive Setting
Creating an Adaptive SettingCreating an Adaptive Setting
Creating an Adaptive SettingDavid Keener
 
Public Speaking for Writers
Public Speaking for WritersPublic Speaking for Writers
Public Speaking for WritersDavid Keener
 
21st Century Writer
21st Century Writer21st Century Writer
21st Century WriterDavid Keener
 
Titanic: The Forgotten Passengers
Titanic: The Forgotten PassengersTitanic: The Forgotten Passengers
Titanic: The Forgotten PassengersDavid Keener
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best PracticesDavid Keener
 
Elevator Up, Please!
Elevator Up, Please!Elevator Up, Please!
Elevator Up, Please!David Keener
 
Rails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineRails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineDavid Keener
 
Killer Business Models
Killer Business ModelsKiller Business Models
Killer Business ModelsDavid Keener
 
Building Facebook Apps
Building Facebook AppsBuilding Facebook Apps
Building Facebook AppsDavid Keener
 
Leveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsLeveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsDavid Keener
 
Quick Start: ActiveScaffold
Quick Start: ActiveScaffoldQuick Start: ActiveScaffold
Quick Start: ActiveScaffoldDavid Keener
 
Using Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case StudyUsing Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case StudyDavid Keener
 
Implementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteDavid Keener
 
Creating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartCreating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartDavid Keener
 
Quick Start: Rails
Quick Start: RailsQuick Start: Rails
Quick Start: RailsDavid Keener
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APIDavid Keener
 

Mehr von David Keener (20)

Writing Killer Fight Scenes
Writing Killer Fight ScenesWriting Killer Fight Scenes
Writing Killer Fight Scenes
 
Build a Space Battle
Build a Space BattleBuild a Space Battle
Build a Space Battle
 
Creating an Adaptive Setting
Creating an Adaptive SettingCreating an Adaptive Setting
Creating an Adaptive Setting
 
Public Speaking for Writers
Public Speaking for WritersPublic Speaking for Writers
Public Speaking for Writers
 
21st Century Writer
21st Century Writer21st Century Writer
21st Century Writer
 
Titanic: The Forgotten Passengers
Titanic: The Forgotten PassengersTitanic: The Forgotten Passengers
Titanic: The Forgotten Passengers
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best Practices
 
Elevator Up, Please!
Elevator Up, Please!Elevator Up, Please!
Elevator Up, Please!
 
Rails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineRails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search Engine
 
Killer Business Models
Killer Business ModelsKiller Business Models
Killer Business Models
 
Rails Security
Rails SecurityRails Security
Rails Security
 
Building Facebook Apps
Building Facebook AppsBuilding Facebook Apps
Building Facebook Apps
 
Leveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsLeveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook Apps
 
Quick Start: ActiveScaffold
Quick Start: ActiveScaffoldQuick Start: ActiveScaffold
Quick Start: ActiveScaffold
 
Using Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case StudyUsing Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case Study
 
Practical JRuby
Practical JRubyPractical JRuby
Practical JRuby
 
Implementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking Site
 
Creating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartCreating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChart
 
Quick Start: Rails
Quick Start: RailsQuick Start: Rails
Quick Start: Rails
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services API
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Creating Custom Charts With Ruby Vector Graphics

  • 1. Creating Custom Charts Using Ruby Vector Graphics (RVG) in Rails Apps By David Keener http://www.keenertech.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 21.
  • 22.
  • 23.  
  • 24.
  • 25.
  • 26.
  • 27. Transformation Algorithm def self.transform(pt, ptc) npt = { :x => 0 . 0 , :y => 0 . 0 , :z => 0 . 0 } vdist = 4 . 0 d = ptc[ :z ] - pt[ :z ] if d < 0 . 0 d = 0 . 0 - d end if d < 1 npt[ :x ] = (pt[ :x ].to_f - ptc[ :x ].to_f) * 1000000 . 0 npt[ :y ] = (pt[ :y ].to_f - ptc[ :y ].to_f) * 1000000 . 0 npt[ :z ] = 1000000 . 0 else npt[ :x ] = (vdist * ((pt[ :x ].to_f * ptc[ :z ].to_f) - (ptc[ :x ].to_f * pt[ :z ].to_f))) / d npt[ :y ] = (vdist * ((pt[ :y ].to_f * ptc[ :z ].to_f) - (ptc[ :y ].to_f * pt[ :z ].to_f))) / d npt[ :z ] = pt[ :z ].to_f / d end npt # Return a hash containing X-Y-Z coordinates for the transformed point end The transform method from the StarMap Model: pt - A hash containing X-Y-Z coordinates for the point to be transformed ptc - X-Y-Z coordinates for the reference point, sometimes referred to as the center of the projection
  • 28.