SlideShare uma empresa Scribd logo
1 de 3
Please help us to solve this question by using Java codes and to plot graph of it!!!
Solution
package examples;
import java.io.*;
import java.util.*;
import sos.db.*;
public boolean checkBounds() {
if(bX1 == bX2 || bY1 == bY2) {
return false;
}
double xa = 0D;
double ya = 0D;
int a = 0;
boolean hC = false;
double xn = 0D;
double yn = 0D;
for(double[] vertex : this.getShape().getVerticies()) {
if(vertex[0] >= bX2) {
xa += vertex[0];
ya += vertex[1];
a++;
hC = true;
xn -= 1D;
}
if(vertex[0] <= bX1) {
xa += vertex[0];
ya += vertex[1];
a++;
hC = true;
xn += 1D;
}
if(vertex[1] >= bY2) {
xa += vertex[0];
ya += vertex[1];
a++;
hC = true;
yn -= 1D;
}
if(vertex[1] <= bY1) {
xa += vertex[0];
ya += vertex[1];
a++;
hC = true;
yn += 1D;
}
}
if(hC) {
Vec2 n = new Vec2(xn, yn).uscale();
Vec2 cp = new Vec2(xa / a, ya / a);
Vec2 rap = cp.sub(getShape().getCM());
Vec2 va = getVelocityAt(rap);
Vec2 rva = va;
Vec2 rvb = Vec2.ZERO_VEC.sub(va);
double pj = -(1D + getElasticity()) * rva.dot(n);
double j = pj / (1 / getShape().getMass() + Math.pow(rap.cross(n), 2D) / getShape().getMass());
applyForce(new AppliedForce(n.scale(j), rap, getShape().getMass()));
}
return hC;
}
public void applyForce(AppliedForce... f) {
for(AppliedForce vec : f) {
Vec2 a = vec.getForce().divide(getShape().getMass());
applyLinearAcceleration(a);
double aa = a.relativeCosine(getShape().getTangent(vec.getOffsetCM())) * a.getMagnitude() /
getShape().getMass();
applyAngularAcceleration(aa);
}
}
Please help us to solve this question by using Java codes and to plot.docx

Mais conteúdo relacionado

Semelhante a Please help us to solve this question by using Java codes and to plot.docx

ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)CrackDSE
 
Calculus II - 32
Calculus II - 32Calculus II - 32
Calculus II - 32David Mao
 
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docx
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docxxy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docx
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docxericbrooks84875
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfarihantmobileselepun
 
Integral table
Integral tableIntegral table
Integral tablezzzubair
 
qdoc.tips_math-formula and short hand notes
qdoc.tips_math-formula and short hand notesqdoc.tips_math-formula and short hand notes
qdoc.tips_math-formula and short hand notesNaeemAhmad289736
 
Expanding Binomial Brackets
Expanding Binomial BracketsExpanding Binomial Brackets
Expanding Binomial BracketsPassy World
 
567 nice and_hard_inequality
567 nice and_hard_inequality567 nice and_hard_inequality
567 nice and_hard_inequalityTran Duc Bang
 
Computer lab (programs)
Computer lab (programs)Computer lab (programs)
Computer lab (programs)mshoaib15
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)CrackDSE
 
Maths formulae booklet (iit jee)
Maths formulae booklet (iit jee)Maths formulae booklet (iit jee)
Maths formulae booklet (iit jee)s9182647608y
 

Semelhante a Please help us to solve this question by using Java codes and to plot.docx (20)

Integral table
Integral tableIntegral table
Integral table
 
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
 
Calculus II - 32
Calculus II - 32Calculus II - 32
Calculus II - 32
 
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docx
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docxxy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docx
xy2.5 3.0 3.5-1.0 6 7 81.0 0 1 23.0 -6 -5 .docx
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdf
 
Numerical Methods Solving Linear Equations
Numerical Methods Solving Linear EquationsNumerical Methods Solving Linear Equations
Numerical Methods Solving Linear Equations
 
Integral table
Integral tableIntegral table
Integral table
 
Tabla de fórmulas integrales.
Tabla de fórmulas integrales.Tabla de fórmulas integrales.
Tabla de fórmulas integrales.
 
Integral table
Integral tableIntegral table
Integral table
 
Integral table
Integral tableIntegral table
Integral table
 
Integral table
Integral tableIntegral table
Integral table
 
Tut 1
Tut 1Tut 1
Tut 1
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
qdoc.tips_math-formula and short hand notes
qdoc.tips_math-formula and short hand notesqdoc.tips_math-formula and short hand notes
qdoc.tips_math-formula and short hand notes
 
Expanding Binomial Brackets
Expanding Binomial BracketsExpanding Binomial Brackets
Expanding Binomial Brackets
 
567 nice and_hard_inequality
567 nice and_hard_inequality567 nice and_hard_inequality
567 nice and_hard_inequality
 
Computer lab (programs)
Computer lab (programs)Computer lab (programs)
Computer lab (programs)
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
 
Maths formulae booklet (iit jee)
Maths formulae booklet (iit jee)Maths formulae booklet (iit jee)
Maths formulae booklet (iit jee)
 

Mais de rtodd19

Please identify hardware device(s) (peripherals) and describe how a NO.docx
Please identify hardware device(s) (peripherals) and describe how a NO.docxPlease identify hardware device(s) (peripherals) and describe how a NO.docx
Please identify hardware device(s) (peripherals) and describe how a NO.docxrtodd19
 
please list two of the devices provided by the text (or other devices-.docx
please list two of the devices provided by the text (or other devices-.docxplease list two of the devices provided by the text (or other devices-.docx
please list two of the devices provided by the text (or other devices-.docxrtodd19
 
Please I need this answered with refrences - Thanks In a database- to.docx
Please I need this answered with refrences - Thanks In a database- to.docxPlease I need this answered with refrences - Thanks In a database- to.docx
Please I need this answered with refrences - Thanks In a database- to.docxrtodd19
 
Please help- thanks- Many government agencies and other organizations.docx
Please help- thanks- Many government agencies and other organizations.docxPlease help- thanks- Many government agencies and other organizations.docx
Please help- thanks- Many government agencies and other organizations.docxrtodd19
 
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docx
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docxPlease explain Advanced Persistent Threat!SolutionAnswer- An advanced.docx
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docxrtodd19
 
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docx
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docxPlease explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docx
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docxrtodd19
 
Please don-'t copy from an outside source Briefly discuss the distribu.docx
Please don-'t copy from an outside source Briefly discuss the distribu.docxPlease don-'t copy from an outside source Briefly discuss the distribu.docx
Please don-'t copy from an outside source Briefly discuss the distribu.docxrtodd19
 
Please distinguish between a malware and a virus- How are they same an.docx
Please distinguish between a malware and a virus- How are they same an.docxPlease distinguish between a malware and a virus- How are they same an.docx
Please distinguish between a malware and a virus- How are they same an.docxrtodd19
 
Please answer part c of the question- Thank you- The International Ato.docx
Please answer part c of the question- Thank you- The International Ato.docxPlease answer part c of the question- Thank you- The International Ato.docx
Please answer part c of the question- Thank you- The International Ato.docxrtodd19
 
Pictorialize a human being as a computer system-SolutionThe human nerv.docx
Pictorialize a human being as a computer system-SolutionThe human nerv.docxPictorialize a human being as a computer system-SolutionThe human nerv.docx
Pictorialize a human being as a computer system-SolutionThe human nerv.docxrtodd19
 
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docx
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docxPersonal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docx
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docxrtodd19
 
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docx
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docxPeruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docx
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docxrtodd19
 
Why do some authors view investment cash flow sensitivity as a symptom.docx
Why do some authors view investment cash flow sensitivity as a symptom.docxWhy do some authors view investment cash flow sensitivity as a symptom.docx
Why do some authors view investment cash flow sensitivity as a symptom.docxrtodd19
 
Why do some converging technologies raise special ethical and social i.docx
Why do some converging technologies raise special ethical and social i.docxWhy do some converging technologies raise special ethical and social i.docx
Why do some converging technologies raise special ethical and social i.docxrtodd19
 
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docx
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docxWhy do the outer stars in our galaxy not slow down- as Keplers laws of.docx
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docxrtodd19
 
Why are concentrated interests and diffuse costs important in predicti.docx
Why are concentrated interests and diffuse costs important in predicti.docxWhy are concentrated interests and diffuse costs important in predicti.docx
Why are concentrated interests and diffuse costs important in predicti.docxrtodd19
 
Who are organizational stakeholders and what types of responsibilities.docx
Who are organizational stakeholders and what types of responsibilities.docxWho are organizational stakeholders and what types of responsibilities.docx
Who are organizational stakeholders and what types of responsibilities.docxrtodd19
 
Who are the principle stake holders of the company- Did Dole treat the.docx
Who are the principle stake holders of the company- Did Dole treat the.docxWho are the principle stake holders of the company- Did Dole treat the.docx
Who are the principle stake holders of the company- Did Dole treat the.docxrtodd19
 
Which type of network covers a contiguous geographic area- such as an.docx
Which type of network covers a contiguous geographic area- such as an.docxWhich type of network covers a contiguous geographic area- such as an.docx
Which type of network covers a contiguous geographic area- such as an.docxrtodd19
 
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docx
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docxWhich space is the most abundant in 1-0 M of wak acid HCN solution- As.docx
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docxrtodd19
 

Mais de rtodd19 (20)

Please identify hardware device(s) (peripherals) and describe how a NO.docx
Please identify hardware device(s) (peripherals) and describe how a NO.docxPlease identify hardware device(s) (peripherals) and describe how a NO.docx
Please identify hardware device(s) (peripherals) and describe how a NO.docx
 
please list two of the devices provided by the text (or other devices-.docx
please list two of the devices provided by the text (or other devices-.docxplease list two of the devices provided by the text (or other devices-.docx
please list two of the devices provided by the text (or other devices-.docx
 
Please I need this answered with refrences - Thanks In a database- to.docx
Please I need this answered with refrences - Thanks In a database- to.docxPlease I need this answered with refrences - Thanks In a database- to.docx
Please I need this answered with refrences - Thanks In a database- to.docx
 
Please help- thanks- Many government agencies and other organizations.docx
Please help- thanks- Many government agencies and other organizations.docxPlease help- thanks- Many government agencies and other organizations.docx
Please help- thanks- Many government agencies and other organizations.docx
 
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docx
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docxPlease explain Advanced Persistent Threat!SolutionAnswer- An advanced.docx
Please explain Advanced Persistent Threat!SolutionAnswer- An advanced.docx
 
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docx
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docxPlease explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docx
Please explain--- a) why SO2 (g) and H2O (l) formed instead of H2 (g)-.docx
 
Please don-'t copy from an outside source Briefly discuss the distribu.docx
Please don-'t copy from an outside source Briefly discuss the distribu.docxPlease don-'t copy from an outside source Briefly discuss the distribu.docx
Please don-'t copy from an outside source Briefly discuss the distribu.docx
 
Please distinguish between a malware and a virus- How are they same an.docx
Please distinguish between a malware and a virus- How are they same an.docxPlease distinguish between a malware and a virus- How are they same an.docx
Please distinguish between a malware and a virus- How are they same an.docx
 
Please answer part c of the question- Thank you- The International Ato.docx
Please answer part c of the question- Thank you- The International Ato.docxPlease answer part c of the question- Thank you- The International Ato.docx
Please answer part c of the question- Thank you- The International Ato.docx
 
Pictorialize a human being as a computer system-SolutionThe human nerv.docx
Pictorialize a human being as a computer system-SolutionThe human nerv.docxPictorialize a human being as a computer system-SolutionThe human nerv.docx
Pictorialize a human being as a computer system-SolutionThe human nerv.docx
 
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docx
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docxPersonal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docx
Personal Trainer- Inc- owns and operates fitness centers in a dozen Mi.docx
 
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docx
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docxPeruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docx
Peruse the readings by Bennis and Nanus- Schein- and Ulrich and Lake-.docx
 
Why do some authors view investment cash flow sensitivity as a symptom.docx
Why do some authors view investment cash flow sensitivity as a symptom.docxWhy do some authors view investment cash flow sensitivity as a symptom.docx
Why do some authors view investment cash flow sensitivity as a symptom.docx
 
Why do some converging technologies raise special ethical and social i.docx
Why do some converging technologies raise special ethical and social i.docxWhy do some converging technologies raise special ethical and social i.docx
Why do some converging technologies raise special ethical and social i.docx
 
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docx
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docxWhy do the outer stars in our galaxy not slow down- as Keplers laws of.docx
Why do the outer stars in our galaxy not slow down- as Keplers laws of.docx
 
Why are concentrated interests and diffuse costs important in predicti.docx
Why are concentrated interests and diffuse costs important in predicti.docxWhy are concentrated interests and diffuse costs important in predicti.docx
Why are concentrated interests and diffuse costs important in predicti.docx
 
Who are organizational stakeholders and what types of responsibilities.docx
Who are organizational stakeholders and what types of responsibilities.docxWho are organizational stakeholders and what types of responsibilities.docx
Who are organizational stakeholders and what types of responsibilities.docx
 
Who are the principle stake holders of the company- Did Dole treat the.docx
Who are the principle stake holders of the company- Did Dole treat the.docxWho are the principle stake holders of the company- Did Dole treat the.docx
Who are the principle stake holders of the company- Did Dole treat the.docx
 
Which type of network covers a contiguous geographic area- such as an.docx
Which type of network covers a contiguous geographic area- such as an.docxWhich type of network covers a contiguous geographic area- such as an.docx
Which type of network covers a contiguous geographic area- such as an.docx
 
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docx
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docxWhich space is the most abundant in 1-0 M of wak acid HCN solution- As.docx
Which space is the most abundant in 1-0 M of wak acid HCN solution- As.docx
 

Último

Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 

Último (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 

Please help us to solve this question by using Java codes and to plot.docx

  • 1. Please help us to solve this question by using Java codes and to plot graph of it!!! Solution package examples; import java.io.*; import java.util.*; import sos.db.*; public boolean checkBounds() { if(bX1 == bX2 || bY1 == bY2) { return false; } double xa = 0D; double ya = 0D; int a = 0; boolean hC = false; double xn = 0D; double yn = 0D; for(double[] vertex : this.getShape().getVerticies()) { if(vertex[0] >= bX2) { xa += vertex[0]; ya += vertex[1]; a++; hC = true; xn -= 1D; } if(vertex[0] <= bX1) { xa += vertex[0]; ya += vertex[1]; a++; hC = true; xn += 1D; } if(vertex[1] >= bY2) {
  • 2. xa += vertex[0]; ya += vertex[1]; a++; hC = true; yn -= 1D; } if(vertex[1] <= bY1) { xa += vertex[0]; ya += vertex[1]; a++; hC = true; yn += 1D; } } if(hC) { Vec2 n = new Vec2(xn, yn).uscale(); Vec2 cp = new Vec2(xa / a, ya / a); Vec2 rap = cp.sub(getShape().getCM()); Vec2 va = getVelocityAt(rap); Vec2 rva = va; Vec2 rvb = Vec2.ZERO_VEC.sub(va); double pj = -(1D + getElasticity()) * rva.dot(n); double j = pj / (1 / getShape().getMass() + Math.pow(rap.cross(n), 2D) / getShape().getMass()); applyForce(new AppliedForce(n.scale(j), rap, getShape().getMass())); } return hC; } public void applyForce(AppliedForce... f) { for(AppliedForce vec : f) { Vec2 a = vec.getForce().divide(getShape().getMass()); applyLinearAcceleration(a); double aa = a.relativeCosine(getShape().getTangent(vec.getOffsetCM())) * a.getMagnitude() / getShape().getMass(); applyAngularAcceleration(aa); } }