Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3252 Sentence Reworking (for the GamePhysics Example, Part 3) #3955

Merged
merged 5 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ usedDB = cdb ([] :: [QuantityDict]) (map nw symbolsAll ++ map nw acronyms)
para1_introduction_intro :: Sentence
para1_introduction_intro = foldlSent
[S "Due to the rising cost of developing", plural videoGame `sC`
S "developers are looking for ways to save time and money for their" +:+.
S "developers are looking" `S.for` S "ways to save time and money for their" +:+.
plural project, S "Using an", phrase openSource,
phrase physLib,
S "that is reliable and free will cut down development costs and lead",
S "to better quality" +:+. plural product_ ,
S "The document describes the program" ,
S "The document describes the program",
S " based on the original, manually created version of" +:+
namedRef externalLinkRef (S "GamePhysics")]

Expand Down Expand Up @@ -244,7 +244,7 @@ sysCtxFig1 = llcc (makeFigRef "sysCtxDiag") $ fig (titleize sysCont)
sysCtxDesc :: Contents
sysCtxDesc = foldlSPCol [S "The interaction between the", phraseNP (product_
`andThe` user), S "is through an application programming" +:+.
phrase interface, S "The responsibilities of the", phraseNP (user
phrase interface, S "The responsibilities" `S.ofThe` phraseNP (user
`andThe` system), S "are as follows"]

sysCtxUsrResp :: [Sentence]
Expand Down Expand Up @@ -420,7 +420,7 @@ offShelfSolsIntro, offShelfSols2DList,
offShelfSolsMid, offShelfSols3DList :: Contents

offShelfSolsIntro = mkParagraph $ foldlSentCol
[S "As mentioned in the", namedRef (SRS.probDesc [] []) (phrase problemDescription) `sC`
[S "As mentioned" `S.inThe` namedRef (SRS.probDesc [] []) (phrase problemDescription) `sC`
S "there already exist free", phrase openSource, phrase game +:+.
plural physLib, S "Similar", getAcc twoD, plural physLib, S "are"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ likelyChgs = [lcVODES, lcEC, lcID, lcIJC]
unlikelyChangesStmt1, unlikelyChangesStmt2, unlikelyChangesStmt3, unlikelyChangesStmt4 :: Sentence

unlikelyChangesStmt1 = (S "The goal of the system" `S.is` S "to simulate the interactions of rigid bodies" !.)
unlikelyChangesStmt2 = (S "There will always be a source of input data external" `S.toThe` S "software" !.)
unlikelyChangesStmt2 = (S "There will always be a source of input data external to the software" !.)
unlikelyChangesStmt3 = (S "A Cartesian Coordinate system is used" !.)
unlikelyChangesStmt4 = (S "All objects" `S.are` S "rigid bodies" !.)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ coeffRestitutionEqn = neg $ sy finRelVel $.

coeffRestitutionDesc :: Sentence
coeffRestitutionDesc = foldlSent [S "The", getTandS QP.restitutionCoef,
S "determines the elasticity of a collision between two" +:+. plural rigidBody,
S "determines the elasticity" `S.ofA` S "collision between two" +:+. plural rigidBody,
foldlList Comma List [
eS (sy QP.restitutionCoef $= exactDbl 1) +:+ S "results in an elastic collision",
eS (sy QP.restitutionCoef $< exactDbl 1) +:+ S "results in an inelastic collision",
eS (sy QP.restitutionCoef $= exactDbl 0) +:+ S "results in a totally inelastic collision"]]
eS (sy QP.restitutionCoef $= exactDbl 1) +:+ S "results" `S.in_` S "an elastic collision",
eS (sy QP.restitutionCoef $< exactDbl 1) +:+ S "results" `S.in_` S "an inelastic collision",
eS (sy QP.restitutionCoef $= exactDbl 0) +:+ S "results" `S.in_` S "a totally inelastic collision"]]
-----------------------DD15 Kinetic Energy--------------------------------
kEnergyDD :: DataDefinition
kEnergyDD = ddENoRefs kEnergy Nothing "kEnergy"
Expand Down Expand Up @@ -330,7 +330,7 @@ potEnergyDesc = foldlSent [atStartNP (the QP.potEnergy) `S.of_`
---

collisionAssump, noDampingAssump, rightHandAssump, rigidBodyAssump, rigidTwoDAssump :: Sentence
collisionAssump = S "All collisions are vertex-to-edge" +:+. fromSource assumpCT
collisionAssump = S "All collisions" `S.are` S "vertex-to-edge" +:+. fromSource assumpCT
noDampingAssump = S "No damping occurs during the simulation" +:+. fromSource assumpDI
rightHandAssump = S "A" +:+ phrase rightHand `S.is` S "used" +:+. fromSource assumpAD
rigidBodyAssump = S "All bodies are assumed to be rigid" +:+. fromSource assumpOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ conservationOfMomentRel = UnaryOp $ Summation Nothing

conservationOfMomentDesc :: Sentence
conservationOfMomentDesc = foldlSent [S "In an isolated system,",
S "where the sum of external", phrase impulseS, S "acting on the system is zero,",
S "the total momentum of the bodies" `S.is` S "constant (conserved)"
S "where the sum of external", phrase impulseS, S "acting" `S.onThe` S "system is zero,",
S "the total momentum" `S.ofThe` S "bodies is constant (conserved)"
]

--[mass, initialVelocity, finalVelocity]
Expand All @@ -60,7 +60,7 @@ conservationOfMomentDeriv = foldlSent [S "When bodies collide, they exert",
S "an equal (force) on each other in opposite directions" +:+.
S "This is Newton's third law:",
S "(expr1)",
S "The objects collide with each other for the exact same amount of",
S "The objects collide with each other" `S.for` S "the exact same amount of",
phrase time, getS time,
S "The above equation is equal" `S.toThe` phrase impulseS,
S "(GD1 ref)",
Expand Down Expand Up @@ -126,7 +126,7 @@ relativeVelocityInCollisionsDesc :: Sentence
relativeVelocityInCollisionsDesc = foldlSent [S "In a collision, the",
phrase velocity `S.of_` S "rigid body A",
S "colliding with another body B relative to that",
S "body, (symbol vAB)," `S.is` S "the difference between the", plural velocity,
S "body, (symbol vAB)," `S.is` "the difference between the", plural velocity,
S "of A", S "and B at point P"
]

Expand All @@ -145,9 +145,9 @@ coefficientOfRestitutionDesc :: Sentence
coefficientOfRestitutionDesc = foldlSent [S "The", phrase restitutionCoef,
getS restitutionCoef, S "is",
S "a unitless, dimensionless quantity that determines the elasticity of a",
S "collision between two bodies. (symbol/expr)[CR = 1] results in an elastic",
S "collision, while (symbol/expr)[CR < 1] results in an inelastic collision,",
S "and (symbol/expr)[CR = 0] results in a totally inelastic collision"
S "collision between two bodies. (symbol/expr)[CR = 1] results" `S.in_` S "an elastic",
S "collision, while (symbol/expr)[CR < 1] results" `S.in_` S "an inelastic collision,",
S "and (symbol/expr)[CR = 0] results" `S.in_` S "a totally inelastic collision"
]

--[restitutionCoef, normCollisionVect, initRelativeVelocityAB, finalRelativeVelocityAB]
Expand All @@ -164,7 +164,7 @@ torqueGDef = makeRC "torque"

torqueDesc :: Sentence
torqueDesc = foldlSent [S "The", phrase torque, getS torque,
S "on a body measures the", S "the tendency of a", phrase force,
S "on a body measures the", S "the tendency" `S.ofA` phrase force,
S "to rotate the body around an axis or pivot"
]

Expand Down