1 / 7

Science and Sensitivity Science & Computers PHY307/PHY607 Oct. 3, 2002

This document outlines fundamental concepts in vector mathematics and functions relevant to PHY307/PHY607. It covers essential operations, including multiplication, addition, and subtraction of vectors, alongside practical examples demonstrating each operation. The text also introduces the concept of functions, illustrating their capability to perform actions and return values, exemplified through Python code. Additionally, the document briefly discusses the nature of gravity, focusing on its directionality and strength, providing an integrated understanding of these core physics topics.

keiji
Télécharger la présentation

Science and Sensitivity Science & Computers PHY307/PHY607 Oct. 3, 2002

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Science and SensitivityScience & ComputersPHY307/PHY607Oct. 3, 2002 • HWK: Work on your proposal. PHY307, Fall 2002

  2. Vector math • Multiply by a number:(each coordinate gets multiplied.) = 1.5 * PHY307, Fall 2002

  3. Vector math • Adding vectors:[each coordinate gets added: (1,2,3) + (0,4,-1) = (1,6,2).] = + PHY307, Fall 2002

  4. Vector math • Subtracting vectors geometrically:[each coordinate gets added: (1,2,3) - (0,4,-1) = (1,-2,4).] = - PHY307, Fall 2002

  5. Functions • Can: • do things (make a sphere, move a box.) • give a value (a reference to a sphere, the sine of a number.) • How do you get your own function to return a value? • Use the return statement. PHY307, Fall 2002

  6. return example from visual import * def minus(a,b): return a–b numa = 1 numb = 2 print minus(numa,numb) veca = vector(0,1,4) vecb = vector(2,1,1) print minus(veca,vecb) PHY307, Fall 2002

  7. Gravity • Is in what direction? • How strong is it? PHY307, Fall 2002

More Related