Atjaunināt sīkdatņu piekrišanu

E-grāmata: Hardcore Programming for Mechanical Engineers

  • Formāts: EPUB+DRM
  • Izdošanas datums: 22-Jun-2021
  • Izdevniecība: No Starch Press,US
  • Valoda: eng
  • ISBN-13: 9781718500792
Citas grāmatas par šo tēmu:
  • Formāts - EPUB+DRM
  • Cena: 41,46 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: EPUB+DRM
  • Izdošanas datums: 22-Jun-2021
  • Izdevniecība: No Starch Press,US
  • Valoda: eng
  • ISBN-13: 9781718500792
Citas grāmatas par šo tēmu:

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

An exploration of core programming techniques for engineers. Learn to solve real engineering problems.

Hardcore Programming for Engineers is about solving mechanical engineering problems using a computer. These problems require good programming skills and some knowledge of computer graphics, geometry, regular expressions, and other technologies that are covered in this book but which are typically hard to find in one text alone. The book covers all the essential ingredients that make up engineering applications with a focus on code quality and automated unit testing to ensure that code does what it is supposed to do, without errors.

The "hardcore" approach means that you do everything yourself and write a lot of code. The approach takes much longer than using existing libraries but it's key to acquiring a deeper understanding of how things work. You code everything from a library that deals with 2D geometry to a finished engineering application that reads data from a text file, parses it, and produces a vector image as a result. In the process, you gain a full understanding of how many disciplines come together to solve a problem, how to build small libraries to solve individuals problems, and how to make it all work together seamlessly.

Recenzijas

"For mechanical engineers working with engineering drawings and statics, theres a lot to like." Lee Teschler, Design World

Papildus informācija

An exploration of core programming techniques for engineers. Readers learn to solve real engineering problems.
Acknowledgments xxi
Introduction xxiii
Who This Book Is For xxiii
What You'll Learn xxiv
About This Book xxiv
What Is the "Hardcore" About? xxv
Why Python? xxv
Contents at a Glance xxvii
Setting Up Your Environment xxix
Downloading the Book's Code xxix
Installing Python xxx
Installing and Configuring PyCharm xxxi
PyCharm Introduction xxxiv
Creating Packages and Files xxxv
Creating Run Configurations xxxvi
Debugging Python Code xxxix
Summary xliv
PART I BASICS
1 A Short Python Primer
3(20)
Python Packages and Modules
3(2)
Modules
4(1)
Packages
4(1)
Running Files
5(1)
Importing Code
5(4)
Different Import Forms
6(3)
Documenting the Code with Docstrings
9(2)
Collections in Python
11(9)
Sets
11(1)
Tuples
12(3)
Lists
15(3)
Dictionaries
18(2)
Destructuring
20(1)
Summary
21(2)
2 Two Python Paradigms
23(26)
Functional Programming
23(13)
Pure Functions
24(1)
Immutability
25(1)
Lambdas
26(1)
Higher-Order Functions
27(1)
Functions Inside Other Functions
28(1)
Filter, Map, and Reduce
29(6)
List Comprehensions
35(1)
Object-Oriented Programming
36(9)
Classes
37(6)
Magic Methods
43(2)
Type Hints
45(2)
Summary
47(2)
3 The Command Line
49(16)
Unix and Windows
49(1)
Finding Your Shell
50(1)
Installing the Windows Subsystem for Linux
50(1)
Taking a First Look at the Shell
51(1)
Files and Directories
51(5)
Moving Around
52(1)
Creating Files and Directories
53(1)
Deleting Files and Directories
54(1)
Commands Summary
55(1)
Using Windows Subsystem for Linux
55(1)
Running Python Scripts
56(1)
Passing Arguments to the Script
57(1)
Standard Input and Output
58(1)
Redirecting the Output to a File
58(1)
Redirecting the Input from a File
58(1)
Using PyCharm's Python Console
59(2)
Summary
61(4)
PART II 2D GEOMETRY
4 Points And Vectors
65(36)
The Point Class
67(4)
Calculating Distance Between Points
68(1)
Addition and Subtraction Operators
69(2)
The Vector Class
71(14)
Addition and Subtraction Operators
72(1)
Scaling Vectors
73(1)
Displacing Points
73(1)
Vector Norms
74(2)
Immutable Design
76(1)
Naming Convention
77(1)
Dot Product
77(1)
Projecting Vectors
78(1)
Cross Product
79(1)
Parallel and Perpendicular Vectors
80(1)
Angles Between Vectors
81(2)
Rotating Vectors
83(1)
Sine and Cosine
84(1)
Completing Our Classes
85(5)
Checking Equality
85(3)
String Representation
88(1)
Vector Factories
89(1)
Unit Testing
90(9)
Testing Distances
90(4)
Testing Vector Plus and Minus Operations
94(1)
Testing Vector Product Operations
95(1)
Testing Vector Parallelism and Perpendicularity
96(1)
Three Golden Rules for Unit Testing
97(2)
Summary
99(2)
5 Unes And Segments
101(30)
Segment Class
101(23)
The Segment's Direction
103(2)
The Segment's Length
105(2)
The t Parameter and Middle Points
107(7)
Closest Point
114(3)
Distance to a Point
117(1)
Segment Intersections
117(4)
Equality and String Representation
121(3)
Line Class
124(4)
Line Intersections
126(2)
Segment's Bisector
128(1)
Summary
129(2)
6 Polygons
131(40)
Polygon Class
132(16)
Sides
133(4)
Centroid
137(2)
Contains Point
139(5)
Polygon Factory
144(2)
Polygon Equality
146(2)
Circle Class
148(7)
Contains Point
149(1)
Circle to Polygon
150(2)
Equality and String Representation
152(1)
Circle Factories
153(2)
Rect Class
155(14)
Contains Point
158(1)
Intersections
158(6)
Convert to Polygon
164(1)
Equality
165(2)
Rectangle Factories
167(2)
Summary
169(2)
7 Affine Transformations
171(32)
Affine Transformations
172(5)
Examples of Affine Transformations
174(3)
The Affine Transformation Class
177(15)
Testing the Transformation of Points
178(1)
Transform Segments and Polygons
179(2)
Concatenating Transformations
181(3)
Inverting Affine Transformations
184(3)
Scaling
187(2)
Rotating
189(3)
Interpolating Transformations
192(5)
Motivating Interpolation
192(3)
Implementing Interpolation
195(2)
Geom2D Final Touches
197(2)
Test Files
197(1)
Running All Tests
197(1)
Package Imports
198(1)
Summary
199(4)
PART III GRAPHICS AND SIMULATIONS
8 Drawing Vector Images
203(30)
Bitmaps and Vector Images
204(1)
The SVG Format
204(6)
The viewBox
207(1)
Space Transformation
208(2)
The svg Package
210(7)
Templates
210(2)
Loading Templates
212(1)
Image Templates
213(2)
Attributes
215(2)
The SVG Primitives
217(12)
Lines
217(2)
Rectangles
219(2)
Circles
221(1)
Polygons
222(1)
Polylines
223(1)
Text
224(1)
Groups
225(1)
Arrows
226(3)
Primitives Result
229(2)
Package Imports
231(1)
Summary
231(2)
9 Building A Circle From Three Points
233(32)
Application Architecture
234(1)
Setup
235(4)
Creating a Run Configuration
236(3)
Why Use a Run Configuration?
239(1)
Reading the Input and Configuration Files
239(10)
Regular Expressions
241(5)
Regular Expressions Cheat Sheet
246(1)
Matching Points
246(2)
The Configuration File
248(1)
Problem Model and Resolution
249(1)
Generating Output
250(8)
Drawing the Output Circle
251(3)
Drawing the Input Points
254(2)
Result
256(2)
Flip the Y-Axis
258(1)
Distributing Our Application
258(5)
Understanding the Problem
259(1)
Finding a Solution
260(3)
Running the App Without an Input File
263(1)
Summary
263(2)
10 Graphical User Interfaces And The Canvas
265(22)
Tkinter
266(10)
Our First GUI Program
266(4)
The Canvas
270(6)
Drawing Our Geometric Primitives
276(9)
The Canvas Wrapper Class
276(2)
Drawing Segments
278(1)
Drawing Polygons
279(2)
Drawing Arrows
281(4)
Summary
285(2)
11 Animations, Simulations, And The Time Loop
287(20)
Defining Terms
288(3)
What Is an Animation?
288(1)
What Is a System?
288(1)
What Is a Simulation?
289(2)
What Is the Time Loop?
291(1)
Our First Animation
292(7)
Setup
292(2)
Adding a Frame Count Label
294(2)
Updating the System
296(1)
Creating Motion
297(2)
Abstracting the Main Loop Function
299(2)
Refactoring Our Simulation
301(4)
Playing with the Circle Divisions
302(1)
Playing with the Affine Transformation
303(2)
Cleaning Up the Module
305(1)
Summary
305(2)
12 Animating Affine Transformations
307(30)
Application Architecture and Visibility Diagrams
308(1)
Setting Up
309(2)
Creating a Run Configuration
310(1)
Creating a Bash Script
310(1)
Reading the Configuration File
311(1)
Reading Input
312(13)
Formatting the Input
312(1)
Adding Example Input
313(2)
Parsing the Affine Transformation
315(2)
Parsing the Geometric Primitives
317(8)
Running the Simulation
325(9)
Building the User Interface
325(2)
Implementing the Simulation Logic
327(2)
Drawing the Axes
329(5)
Summary
334(3)
PART IV SYSTEMS OF EQUATIONS
13 Matrices And Vectors
337(22)
List Utils
338(1)
Setup
339(1)
Vectors
340(6)
Implementing the Vector Class
340(4)
Testing the Vector Class
344(2)
Matrices
346(12)
Setting Values
347(2)
Getting Values
349(1)
Scaling Values
350(1)
Matrix Equality
351(3)
Testing the Matrix Class
354(4)
Summary
358(1)
14 Unear Equations
359(28)
Systems of Linear Equations
359(2)
Numerical Methods
361(1)
Cholesky Decomposition
361(21)
LU Factorization Methods
362(3)
Understanding Cholesky
365(1)
A Factorization by Hand
366(1)
A Resolution by Hand
367(3)
Implementing Cholesky
370(11)
Testing Cholesky: An Integration Test
381(1)
Summary
382(5)
PART V TRUSS STRUCTURES
15 Structural Models
387(40)
Solving Structural Problems
388(1)
Structural Member Internal Forces
388(4)
Elastic Bodies Subject to External Forces
389(1)
Axial and Shear Forces
390(1)
Bending and Torsional Moments
391(1)
Tension and Compression
392(2)
Hooke's Law
392(1)
Stress-Strain Diagrams
393(1)
Plane Trusses
394(2)
Two-Force Members
396(1)
Stiffness Matrices in Global Coordinates
397(3)
Original Structure Model
400(11)
The Node Class
400(4)
The Bar Class
404(4)
The Structure Class
408(2)
Creating a Structure from the Python Shell
410(1)
The Structure Solution Model
411(15)
The Solution Nodes
411(3)
The Solution Bars
414(7)
The Structure Solution
421(5)
Summary
426(1)
16 Structure Resolution
427(38)
Structure Resolution
428(19)
Interpreting the Stiffness Matrix Terms
429(1)
Structure Initialization
429(1)
The Main Structure Resolution Algorithm
430(2)
Numbering Degrees of Freedom
432(1)
Assembling and Resolving the System of Equations
433(8)
Creating the Solution
441(2)
The Result
443(4)
Advanced Unit Testing: Test Doubles
447(6)
Test Doubles
447(1)
The unittest.mock Package
448(5)
Testing the Structure Solution Class
453(4)
Testing the Structure Resolution Process
457(6)
Summary
463(2)
17 Reading Input From A File
465(28)
Defining the Input Format
465(3)
The Nodes Format
466(1)
The Loads Format
466(1)
The Bars Format
467(1)
The File Format
467(1)
Finding the Regular Expressions
468(3)
The Nodes Regex
468(1)
The Loads Regex
469(1)
The Bars Regex
470(1)
Setup
471(1)
Parsing Nodes
471(3)
Testing the Node Parser
473(1)
Parsing Bars
474(2)
Testing the Bar Parser
475(1)
Parsing Loads
476(2)
Testing the Load Parser
477(1)
Parsing the Structure
478(14)
Overview
479(1)
Setup
480(1)
Ignoring Blank Lines and Comments
480(1)
Parsing the Lines
481(2)
Splitting the Lines and Instantiating the Structure
483(1)
The Result
484(3)
Testing the Structure Parser
487(5)
Summary
492(1)
18 Producing An Svg Image And Text File
493(36)
Setup
494(1)
From Structure Solution to SVG
494(27)
The Configuration File
495(1)
The Settings
496(1)
The Solution Drawing Function
497(2)
Captions
499(2)
The Bars
501(8)
The Nodes
509(2)
The Node Reactions
511(6)
The Loads
517(1)
Putting It All Together
518(1)
The Final Result
519(2)
From Structure Solution to Text
521(7)
Structure Solution's String
522(1)
The Nodes
523(2)
The Bars
525(1)
The Unicode Characters
526(1)
Putting It All Together
527(1)
Summary
528(1)
19 Assembling Our Application
529(18)
A General Overview
529(1)
Setup
530(1)
Input Arguments
531(3)
Generating the Output
534(1)
The Main Script
535(1)
Trying the App
536(10)
Playing with the Arguments
540(2)
Solving a Large Structure
542(4)
Summary
546(1)
Bibliography 547(2)
Index 549
Angel Sola Orbaiceta has been working in the software industry since 2013. He has a degree in industrial engineering with a focus in mechanics and currently works at Glovo, a thriving start-up in the heart of Barcelona. Angel is also the creator of InkStructure, an application for architecture and engineering students that solves 2D structure problems.