15 views

Uploaded by Deepika Agrawal

- Window Pane reflection problem
- Mathematics Today - January 2016
- A TERM PAPER ON DIFFERENT TYPES OF SCALES USED IN ENGINEERING DRAWING
- Baseball Parabola Handout
- OOALV_04
- MATSim for IVABM breakdown Structure.pptx
- algo - ex2 - incomplete!
- 9 Weeks Exam Quarter 1 Review
- SIR list
- IP
- relations_and_functions
- 53 Area
- 17-JoP-May-08
- scalar+ vector + matrix clock- done
- Pantaz d. Vadim
- IRJET-Music Classification using Spectral Features and SVM
- Parabolas.pptx
- (2) Question KPMT 1_2010
- PaperISTA
- Fixed Charge Transportation Model

You are on page 1of 18

Parabola Drawing Algorithms

figs/NITr

Parabola Drawing

Table of contents

1 Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Equation of a parabola

vertex

(y k)2 = 4a(x h)

p

y = k 4a(x k)

x = h + (y k)2 /4

Creates uneven spacing if plotted!!!

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Drawing a parabola

figs/CircleDrawWithYasFx.png figs/CircleDrawWithXasFy.png

y = f (x) = k 4a(x h) x = f (y ) = h + (y k)2 /4a figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Drawing a parabola

parametric form:

y = k 2at

x = h + at 2

Computation can be reduced by exploiting symmetry

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Drawing a parabola

figs/MidpointCircleSymmetry.png

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Drawing a parabola

p

y =k 4a(x k)

x = h + (y k)2 /4

Each pixel computation would need 2 addition (or

subtraction), 2 multiplication (or division) and 3

exponentiation (or root) operation

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

fparabola = y 2 4ax

Without loss of generalization, we consider vertex at (0, 0)

< 0; if (x, y ) is inside the boundary

fparabola (x, y ) = = 0; if (x, y ) is on the boundary

> 0; if (x, y ) is outiside the boundary

dy 2a

Slope of parabola at (x, y ) = dx = y

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

(x, y ) and starts from (0, 0) and

move towards (x, y )

We move from Region 1 to 2 when

dy

= 2a 1, i.e. y 2a figs/ellipse_region.png

dx y

Midpoint parameters are formed in

different way in two regions

Region 1: Change in x < Change in

y

Region 2: Change in y < Change in

x

independent axes figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

want to plot (xk+1 , yk+1 )

We consider yk+1 = yk + 1 MidpointDecision_parabolaRegi

and we check if xk+1 = xk or

xk+1 = xk + 1

p1k

= fparabola (xk + 21 , yk + 1)

= (yk + 1)2 4a(xk + 21 )

Region 1 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

p1k

= fparabola (xk + 21 , yk + 1)

= (yk + 1)2 4a(xk + 21 )

p1k+1

= fparabola (xk+1 + 12 , yk+1 + 1)

= (yk+1 + 1)2 4a(xk+1 + 12 ) figs/MidpointDecision_ellipse

p1k+1

= p1k + 1 + 2yk+1 + 4a(xk xk+1 )

IF p1k < 0

xk+1 = xk

p1k+1 = p1k + 1 + 2yk+1

OTHERWISE

xk+1 = xk + 1

p1k+1 = p1k + 1 + 2yk+1 4a Figure: Decision parameter in

Region 1 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Finding p10

p10 figs/MidpointDecision_parabol

= fparabola ( 21 , 1)

= 12 4a 12

= 1 2a

Region 1 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

want to plot (xk+1 , yk+1 )

We consider xk+1 = xk + 1 figs/MidpointDecision_ellipse

and we check if yk+1 = yk or

yk+1 = yk + 1

p2k

= fparabola (xk + 1, yk + 21 )

= (yk + 12 )2 4a(xk + 1)

Region 2 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

p2k

= fparabola (xk + 1, yk + 21 )

= (yk + 12 )2 4a(xk + 1)

p2k+1

= fparabola (xk+1 + 1, yk+1 + 12 )

= (yk+1 + 12 )2 4a(xk+1 + 1)

figs/MidpointDecision_ellipse

p2k+1

=

p2k +(yk+1 )2 (yk )2 +(yk+1 yk )4a

IF p2k < 0

yk+1 = yk + 1

p2k+1 = p2k 4a + 2yk+1

OTHERWISE

yk+1 = yk

p2k+1 = p2k 4a Figure: Decision parameter in

Region 2 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

Finding p20

p20 figs/MidpointDecision_ellipse

= fparabola (x0 + 1, y0 + 21 )

= (y0 + 21 )2 4a(x0 + 1)

(x0 , y0 ) is the last point of Region 1.

Region 2 figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

1 Input: a, x, y

2 (x0 , y0 ) (0, 0) 10 (x0 , y0 ) (xk , yk )

3 Load (x0 , y0 ) 11 Load (x0 , y0 )

4 p10 1 2a 12 p20 = (y0 + 12 )2 4a(x0 + 1)

5 k0 13 k0

6 if (p1k < 0) 14 if (p2k > 0)

xk+1 xk , yk+1 yk + 1, xk+1 xk + 1, yk+1 yk + 1,

Load (xk , yk+1 ) Load (xk + 1, yk + 1)

p1k+1 = p1k + 1 + 2yk+1 p2k+1 = p2k 4a + 2yk+1

7 Otherwise 15 Otherwise

xk+1 xk + 1, yk+1 yk + 1, xk+1 xk + 1, yk+1 yk ,

Load (xk + 1, yk + 1) Load (xk + 1, yk )

p1k+1 = p1k + 1 + 2yk+1 4a p2k+1 = p2k 4a

8 k (k + 1) 16 k (k + 1)

9 Repeat steps 6,7,8 while yk < 2a 17 Repeat steps 14,15,16 while yk < y

and yk < y

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

with focus a = 1 and vertex (0, 0) till (10, 6).

figs/NITr

Parabola Drawing

Parabola Drawing

Midpoint Parabola Drawing Algorithm

0 -1 0 0

p0 = 1 2 2 = 3 1 0 0 1

k p2k xk+1 yk+1

We move out of Region 1 at 0 -2 1 2

k=1 as yk > 2a. The last 1 2 3 3

2 -2 3 3

point of Region 1 is (0, 1). 3 4 4 4

4 0 5 4

5 -4 6 4

(x0 , y0 ) (0, 1) for Region 2.

6 4 7 5

p20 = f (0 + 1, 1 + 0.5) = 2 7 0 8 5

We stop when x = 10 8 -4 9 5

9 6 10 6

figs/NITr

- Window Pane reflection problemUploaded byLee Gao
- Mathematics Today - January 2016Uploaded byNgông Ngây Ngô
- A TERM PAPER ON DIFFERENT TYPES OF SCALES USED IN ENGINEERING DRAWINGUploaded byJaskaranBir Singh Sandhu
- Baseball Parabola HandoutUploaded byMr. VanWylen
- OOALV_04Uploaded byMrconfusionSap
- algo - ex2 - incomplete!Uploaded byShai Deshe
- 9 Weeks Exam Quarter 1 ReviewUploaded bySmit Patel
- relations_and_functionsUploaded byapi-19505025
- MATSim for IVABM breakdown Structure.pptxUploaded byKỳ Trí Nguyễn
- SIR listUploaded byBilal Masri
- 53 AreaUploaded byapi-3738981
- Pantaz d. VadimUploaded byLaura Colun
- IPUploaded byMIND XPLODE
- 17-JoP-May-08Uploaded bysgganesh
- IRJET-Music Classification using Spectral Features and SVMUploaded byIRJET Journal
- Parabolas.pptxUploaded bySun Ni
- scalar+ vector + matrix clock- doneUploaded byYash Chaudhary
- (2) Question KPMT 1_2010Uploaded byJufarizwani_Mo_137
- PaperISTAUploaded byFateh Seghir
- Fixed Charge Transportation ModelUploaded byallwin92
- Find the Locus of the Centre of the Circle Described on AnyUploaded bydeepak876
- New Text DocumentUploaded byRendy Sun
- Lecture 8Uploaded byMarimuthu Muthaiyan
- Convolution and CorrelationUploaded byeeshgarg
- pseudoleafUploaded byapi-437846864
- Timetable S-2018 V1.2Uploaded byshivaram yadav
- inoper2 q2Uploaded byapi-353305207
- Vectors and Array ListsUploaded byjanamaisie
- ECE GradSyllabus EC520Uploaded byhum
- Seminar ContentsUploaded byShaik Saheb Shaik

- gsm3.pdfUploaded byDeepika Agrawal
- CircleEllipseDrawingAlgorithm.pdfUploaded byDeepika Agrawal
- Hyperbola_Final.pdfUploaded byDeepika Agrawal
- 1201224330000_8255 PPIUploaded byDeepika Agrawal
- 8086 ImpUploaded bySreekanth Pagadapalli
- Class 2-Introduction to 8085 Microprocessor.pdfUploaded byDeepika Agrawal
- Class 1-Introduction to Microprocessor.pdfUploaded byDeepika Agrawal
- 1907325076217_Stack and Subroutines.pdfUploaded byDeepika Agrawal
- 8085 Interrupt.pdfUploaded byDeepika Agrawal

- AR hannes Kaufman Int.pdfUploaded byRizkyAmalia93
- Vector Calculus Sampai Pertemuan 3Uploaded byAditya Arya
- 0580_s18_qp_22Uploaded byChernYangEe
- Ch0111.pdfUploaded byNoscire Ye
- Double and Iterated IntegralsUploaded bySandeep Saju
- Artificial Intelligence for Self-Assembling Swarm Units in a Dynamic Environment - Research ProposalUploaded byLorenzo Zavalla
- Laplace_Table.pdfUploaded byBenjamin Cruz Balatbat
- EN(1053)Uploaded byreacharunk
- Foundations Of Economic AnalysisUploaded byVeeMeas
- Basic Surveying Lecture 1Uploaded byfaumijk
- International Competitions IMO Shortlist 2005 17Uploaded byPrafulla Dhariwal
- ContoringUploaded bysipilPI12
- Three-dimensional Hilbert spaces and an introduction to angular momentumUploaded byRobert Wexler
- AmcUploaded byVenkat Venkataramanan
- VIPEquivalance of Vakanomic and Nonlinear mechanics.pdfUploaded byChernet Tuge
- MB5003 Calculus03 FinalExam 2015Uploaded byAengus Ryan
- Solution-Manual-for-Electromagnetics-for-Engineers-by-Ulaby.pdfUploaded bystripez xx
- Add Math SBP 07 Paper 2Uploaded byNaveen Raj
- IS 7504 1995Uploaded bysocaugusto
- Integration RevisionUploaded bygilalula
- ansysUploaded byginupaul
- 4MCAD-EN ManualUploaded byolgf
- case literature projectUploaded byapi-385487947
- Rumen Zarev -Joining and gluing sutured Floer homologyUploaded byDuncan_Vim
- Xi Year Past Papers 1994 - 2011 ]Uploaded byasif_zehravi8048
- TPJC Promo 2008Uploaded byMathathlete
- Hegel and the Philosophy of Nature - Houlgate ed.Uploaded byFreddy Kislev
- 410102 Finite Element Methods in Civil Engineering 100115092603 Phpapp01Uploaded byVeerarapu Venkata Raghu
- IBRACON2017-JORDLLY-R01Uploaded bybruno_alq
- Solution Manual Mechanical Engineering Principles John Bird 5Uploaded byridwansadely