"Move camera left or right --- TODO: Correct this for camera orientation."
slideUp: aHumMeasure
^self slideDown: (aHumMeasure negated).
solidColor: aColor
"What color should be used to render box or bounding-box in a view?"
southEdge
^ southEdge
southEdge: aQuantity
"Reset the South edge."
"Force North edge."
tilt
"Get my tilt (pitch) in scene coordinates as a value expressed in radians.
^tiltUpDown ifNil: [ tiltUpDown := 0.0. ].
tilt: tiltInRadians
"Set my tilt (pitch) in scene coordinates as a value expressed in radians.
tiltDegrees: angleInDegrees
"Set my tilt (pitch) angle in scene coordinates. "
"Otherwise:"
tiltDown: angleInDegrees
"Set tilt (pitch) in scene coordinates - Note: This is not additive."
tiltPolygons: inputPolygons
"Correct the polygons for my tilt (pitch)."
^resultPolygons.
***26 lines of code ***
tiltUp: angleInDegrees
"Set tilt (pitch) in scene coordinates - Note: This is not additive."
topEdge
^ topEdge
topEdge: aQuantity
"Reset the top edge."
"Force the bottom edge."
velocity: aHumVector
"What is the 3D object`s current velocity?"
volume
"Calculate the volume"
"TODO: This should be a HumMeasure with dimension of L^3"
^v.
westEdge
^ westEdge
westEdge: aQuantity
"Reset the West edge."
"Force the East edge."
width
"Get the width. By convention, the width runs East and West."
^ width
width: aQuantity
"Reset the East-West dimension"
"Hold West edge steady and force the East edge."
x3dCenter
"Center of box (and/or center of bounding box) -- { x y z }
"
"X"
"Y"
^s
x3dExtent
"Return x y z extents as a string
"
"X"
"Y"
"Z"
^s.
xyzString
^s.
zslideRight: aHumMeasure
"Move camera left or right --- TODO: Correct this for camera orientation."
Hum-UI -- HumCamera
eyeX
"Eye in scene coordinates.
^(self westEdge + ((self width) * 0.5) ).
eyeY
"Eye in scene coordinates."
^(self northEdge) - (self depth).
eyeZ
"Eye in scene coordinates."
^((self topEdge) - ((self height) * 0.5) )
isPointInFieldOfView: a3Dpoint
"Is the given 3D point within my field of view.
"Is the point behind the camera`s aperture?"
"Is point in horizontal field of view?"
"Is point in verticle field of view?"
"Passed the filters. Looks okay."
^true.
***24 lines of code ***
slideBackward: aDistance
slideForward: aDistance
"Move in the direction the camera is pointing."
slideLeft: aDistance
^self slideRight: (aDistance negated).
slideRight: aDistance
"Move in the direction the camera is pointing."
slideUpward: aDistance
"Move in the direction the camera is pointing."
unitForward
"Return unit vector pointing along my internal y axis due to my rotation and tilt."
^unitVector.
unitSideways
"Return unit vector pointing along my internal x axis due to my rotation and tilt."
^unitVector.
unitUpDown
"Return unit vector pointing along my internal x axis due to my rotation and tilt."
^unitVector.
Hum-UI -- HumCanvas
about
"
asMorph
"morph := self formCanvas form asMorph."
^morph.
borderWidth: aWidth borderColor: aColor
brushColor
"Get my brush color."
^brushColor ifNil: [brushColor := Color black].
brushColor: aColor
"Set my brush color."
brushPosition
"Get my latest brush position."
^brushPosition ifNil: [ Error signal: 'brush position has not been set' ]
brushPosition: aPoint
"Remember my latest brush position."
drawHumPolygon: aHumPolygon
"The HumPolygon contains 3D points and specifies fill and border colors.
"aFillColor := aHumPolygon fillColor."
"Transform to 2D points"
drawPolygon: aHumPolygon scale: pxPerMeter
drawTextLines: textLines withFont: aFont
extent
"What is my height and width?"
^extent.
fillBackground
"self formCanvas
formCanvas
"What form should I draw on."
^formCanvas ifNil: [ formCanvas := FormCanvas on: (Form extent: DisplayScreen boundingBox extent depth: 32) ].
formCanvas: aFormCanvas
"What form should I draw on."
height
"What is my height?"
^height.
moveBrushTo: aCanvasPoint
"Position the brush, but do not paint yet."
paintTo: aCanvasPoint
"The point should be inside the canvas bounds. Rectangle"
"TODO: Put pixels from brush onto my Form."
projectScenePoint: aScenePoint cameraDepth: aCameraDepth
"Translate from scene coordinates (meters) to canvas coordinates (px)"
"Map East-West to x; North-South to y; Up-Down to z, Time to w."
^aCanvasPoint.
***23 lines of code ***
scalePixelsPerMillimeter
"How many pixels per millimeter of camera viewbox?"
^ pixelsPerMillimeter ifNil: [ 4 ].
scalePixelsPerMillimeter: aNumber
"How many pixels per millimeter of viewbox?"
scalePoint: aScenePoint scaleRatio: pxPerMeter
"Return a x@y point by scaling the given scene point"
^ canvasX @ canvasY.
***22 lines of code ***
skyColor
"What color to use for background fill?"
^ skyColor ifNil: [ skyColor := Color cyan lighter lighter ]
skyColor: aColor
"What color to use for background fill?"
width
"What is my width?"
^width.
Hum-UI -- HumCategoryWidget
categories
^categories ifNil: [Error signal: 'categories have not been initialized']
categories: anArrayOfCategoryNames
renderContentOn: aWAHtmlCanvas
"render self via a simple input tag"
Hum-UI -- HumColumnLayoutWidget
asHTML
"Generate a div containing child widget renderings."
^html.
***23 lines of code ***
asMorph
^layoutMorph.
***23 lines of code ***
Hum-UI -- HumDateWidget
renderContentOn: aWAHtmlCanvas
"render self via a simple input tag"
Hum-UI -- HumDiagram
addConnection: anAssociation
"anAssociation := ( fromNode -> toNode )"
addConnection: anAssociation label: aString
"anAssociation := ( fromNode -> toNode )"
addNode: anObject
"A node object should have a title.
asSVGonHtml: html width: aWidth height: aHeight
"TODO: REFACTOR to render as HTML string."
"Eventually, we want to draw the diagram using SVG."
"FOLLOWING IS A STUB -- EVENTUALLY THIS WILL DRAW NODES AND CONNECTIONS"
"ToDo: Finish this after we have layout working."
***32 lines of code ***
asSVGonHtmlCanvas: html width: aWidth height: aHeight
"Render this diagram on the given Seaside canvas.
"
"Eventually, we want to draw the diagram using SVG."
"FOLLOWING IS A STUB -- EVENTUALLY THIS WILL DRAW NODES AND CONNECTIONS"
"ToDo: Finish this after we have layout working."
***34 lines of code ***
asSVGonSeasideCanvas: html width: aWidth height: aHeight
"Render this diagram on the given Seaside canvas.
"
"Eventually, we want to draw the diagram using SVG."
"FOLLOWING IS A STUB -- EVENTUALLY THIS WILL DRAW NODES AND CONNECTIONS"
"ToDo: Finish this after we have layout working."
***34 lines of code ***
connections
"Model connections as a set of associations."
^ self graph connections.
countNeighborsOfNode: aNode
"Return the number of neighbors of this node.
^ count
getNodesDownstreamFromNode: thisNode
"Return nodes that are connected downstream from this node."
^ result.
getNodesUpstreamFromNode: thisNode
"Return nodes that are connected upstream from this node."
^ result.
getPositionForNode: aNodeObject
^ self mapNodePosition at: aNodeObject ifAbsent: [ ^nil ].
graph
^graph ifNil: [ graph := HumGraph new. ].
initialize
"Set up the graph instance that backs this diagram."
layoutDiagramWithNodeExtent: extentPoint nodeSpacing: spacingPoint
"Layout the diagram using the given node extent and spacing between node edges."
"Following must be set before calling me."
"Following is assumed in code below."
"Reset these instance (global) variables!"
"Compute increments between grid locations."
"In this version, the placement is on a rectalinear grid.
"
"Strategy: Prioritize the objects that have the most connections."
"Count the number of connections that each node has."
"Sort into a collection where nodes with most connections appear first."
"Place the nodes with the most connections on the first pass.
"
***54 lines of code ***
layoutDistanceFromNode: nodeA toNode: nodeB
"Calculate the length of the connection between the nodes."
^r
layoutEnergyOnNode: nodeA fromNode: nodeB
"Calculate a energy scalar.
"
"Radius is the length of the connection between the nodes."
"Attractive force increases when the radius increases.
"
"Repulsion increases when charge Q (number of direct connections) increases.
"
"TODO: Consider using minimum of qA or qB.
"
^ ( attraction - repulsion ).
"Notes:
"
"TODO: Refactor so that attraction and repulsion factors are instance variables and externally adjustable."
"TODO: Set up a UI where user can tinker with the factors. (And we can verify the intended layout effects.)"
***41 lines of code ***
layoutNode: aNode from: aPosition by: anIncrement
"Find a place for the given node starting from the given position.
"
"If the node has already been positioned, leave it where it is."
"At this point, proposedPosition should be the related node`s position"
"Return the position where we placed the node."
^ nodePosition.
***26 lines of code ***
layoutRecursiveWithNode: node relativePosition: relativePosition seenBefore: priorNodes
"Assign initial position to this node, and then, using recursion, to its neighbors.
"
"Return immediately if this node has been seen before.
"Following must be set before calling me."
"Following is assumed in code below."
"Compute increments between grid locations."
"In this version, the placement is on a rectalinear grid.
"
"Next: Find positions for nodes that are downstream from this node."
"ToDo: Calculate which node positions are intersected by connecting lines.
"
"Next: Find positions for nodes that are upstream from this node."
"ToDo: Calculate which node positions are intersected by connecting lines."
***54 lines of code ***
mapNodePosition
^ mapNodePosition ifNil: [ mapNodePosition := Dictionary new. ].
mapPositionNode
" What node is at a position"
^ mapPositionNode ifNil: [ mapPositionNode := Dictionary new. ].
nodeExtent: aPoint
nodeSpacing: aPoint
nodes
"Model nodes as a set of objects."
^ self graph nodes.
setNode: aNodeObject position: aPosition
"Node should also be in nodes collection for internal consistency."
title
^ title ifNil: [ title := '** Diagram has no title! **'].
title: aString
Hum-UI -- HumEditor
addLine: aString
"Delegate to HumText instance."
beep
"If sound is enabled, beep."
characterIndex
"Character index is equal to the number of charactes to the left of the cursor."
^ characterIndex ifNil: [ characterIndex := 0 ].
characterIndex: aSmallInteger
"character index ranges from 0 (left of line) to ()"
currentLine
^result.
deletePriorCharacter
"Insert a character into the text at the current (cursor) position"
"If cursor is at the front of the line, delete is a no op."
"Otherwise . . ."
"(self lines) at: (self lineIndex) put: humTextLine."
"Back the cursor."
***26 lines of code ***
emptySelection
"The selection is empty.
initialize
"Set up undo stack and notification."
insertCharacter: aCharacter
"Insert a character into the text at the current (cursor) position"
"notify model"
"(self lines) at: (self lineIndex) put: humTextLine."
"Advance the cursor."
***22 lines of code ***
insertLine
"Delegate to our HumText instance"
"Adjust the cursor to point to the beginning of the new line."
interpretKey: aSymbol
"Interpret various keyboard gestures."
"Simple arrow keys"
"Alt-Arrow keys"
"Shift-Arrow keys move cursor same as simple arrow keys, but selection is updated."
"Escape key is a no-op at this time."
"Interpret the symbol (keyboard action name) given"
***33 lines of code ***
lineIndex
^ lineIndex ifNil: [ lineIndex := 1 ].
lineIndex: aSmallInteger
lines
^ self text lines.
redo
"Replace text with text that was replaced at last undo."
redoStack
^ redoStack ifNil: [ redoStack := OrderedCollection new ].
selectedText
"Return selected text as a string with CR inserted as needed at ends of lines."
^result.
***29 lines of code ***
selectionAnchor
"Return selection anchor."
^ selectionAnchor ifNil: [selectionAnchor := lineIndex @ characterIndex ].
text
^ text ifNil: [ text := HumText new ].
undo
"Replace text with last item from undo stack."
"last contains current text"
"Now top contains priorText"
"TODO: Keep track of where the cursor was."
undoStack
"Initialize stack"
^undoStack.
update: aText
"When text is updated, we are informed. Put on undo stack."
"TODO: Also track the cursor.
"
updateSelection
"Selection extends from an anchor-point to current cursor position.
"
***22 lines of code ***
Hum-UI -- HumElipsoid
asPolygons
^ self asPolygonsColoredBy: [ self solidColor ].
asPolygonsColorCoded
^ self asPolygonsColoredBy: [ self nextColor ].
asPolygonsColoredBy: aBlockRule
"Produce polygons from the xyList points and the rotation nWedges."
"Wikipedia:
"
^polygons.
***44 lines of code ***
asVPython
Hum-UI -- HumExtrusion
asPolygonsColoredBy: aColorRule
"Translate the moldLoop`s points
"Create quadrangles (HumPolygons) by connecting the dots."
"Preconditions"
"Make polygons covering exterior of the extrusion."
"start"
"up"
"back"
"down"
"forward to end"
"Note: If end-caps need to be covered, the caller must do it."
^polygons.
***38 lines of code ***
asVPython
centerX
"centerX = average value of x from polygon vertices"
^centerX.
centerY
"centerY = average value of Y values from polygon vertices"
^centerY.
centerZ
"centerZ = average value of Z values from polygon vertices"
^centerZ.
changed
"Force recalculation of geometry when next asked."
extrusionPath
"The moldLoop origin is translated along this path to outline the extrusion."
^extrusionPath.
extrusionPath: a3Dpath
"The moldLoop origin is translated along this path to outline the extrusion."
moldLoop
"This loop defines the edges of the extrusion. See also: #extrusionPath:"
"The 3D path is closed by connecting the last point to the first."
^moldLoop.
moldLoop: a3Dpath
"This loop defines the edges of the extrusion. See also: #extrusionPath:"
"The 3D path must be closed by connecting the last point to the first."
volume
Hum-UI -- HumFormWidget
renderContentOn: aWAHtmlCanvas
renderOn: aWAHtmlCanvas
view
"Return my view"
^ view ifNil: [Error signal: (self class,' not properly initialized')]
view: aHumView
Hum-UI -- HumLayoutWidget
addWidget: aHumWidget
reorder: aSortBlock
"Re-order the widgets according to the given sort criteria."
widgets
^ widgets ifNil: [ widgets := OrderedCollection new. ]
Hum-UI -- HumMeasureWidget
renderContentOn: aWAHtmlCanvas
"render self via a simple input tag"
Hum-UI -- HumPane
drawTextLines: textLines onCanvas: aCanvas font: aFont
textChanged: aHumTextEditor
"Text to be displayed in this pane has changed."
"Draw the text lines on my canvas."
Hum-UI -- HumPolygon
<= aHumPolygon
"Z-ordering: Is my north-most point more northerly than the other."
^result.
> aHumPolygon
"Is my north-most point more northerly than the other."
^result.
addVertex: aScenePoint
"The convention is to list vertices in a counter-clockwise direction as seen from the 'outside' of a solid."
"Comment: Wishing to be programmer-friendly or more generic, we allow more than one kind of point.
asTriangles
"Make a polygon with same colors"
^triangles.
***27 lines of code ***
borderColor
^ borderColor ifNil: [ borderColor := Color blue ].
borderColor: aColor
bottom
"If points are 2D, Return min y or zero."
^minY negated.
centroid
"Compute the centroid of the vertices."
^centroid.
color: aColor
"Specify border-color or fll-color instead."
drawOn: aHumCanvas
fillColor
^ fillColor ifNil: [ fillColor := Color gray. ].
fillColor: aColor
inFrontOfCamera
"Return true if at least one y-value is positive."
"This only works properly if vertices have been transformed into camera coordinates."
^false.
left
"Trick because we collection has max: method but no min: method."
^minY negated.
maxRsquared
"Compute the centroid of the vertices."
^maxSquared.
meanRsquared
"Compute the centroid of the vertices."
^(meanRsquared / n).
minRsquared
"Compute the centroid of the vertices."
^minSquared.
northMostPoint
"Find the value of the point that is furtherest North (z-Ordering)"
"Hum coordinate axis point {East. North. Up.}"
^northMost.
parentSolid
"Remember where I came from."
^ parentSolid ifNil: [ Error signal: 'parentSolid not defined' ].
parentSolid: aHumSolid
"Remember where I came from."
path
^self vertices.
pitch: pitchAngle
"Return a new polygon with my points adjusted by pitch about origin."
^newPolygon
rSquared
^rSquared.
right
^maxY
roll: rollAngle
"Return a new polygon with my points adjusted by roll about origin."
^newPolygon
top
"If points are 2D, Return max y."
^maxY.
vertices
"The convention is to list vertices in a counter-clockwise direction as seen from the 'outside' of a solid."
^vertices ifNil: [ vertices := H3dPath new ].
verticesDo: aBlockClosure
xyPoints
"Flatten my 3D points to 2D points in X-Y (floor plan) plane"
^xyVertices.
xzPoints
"Flatten my 3D points to 2D points in X-Z (viewport/billboard) plane. "
^xzVertices.
yaw: yawAngle
"Return a new polygon with my points adjusted by yaw about origin."
"See HumVector"
^newPolygon
yaw: yawAngle aboutPivot: pivot
"Return a new polygon with my points adjusted by yaw about origin."
"See HumVector"
^newPolygon
Hum-UI -- HumRotation
asPolygonsColoredBy: aColorRule
"Produce polygons from the xyList points and the rotation nWedges."
^tPolygons.
***41 lines of code ***
asVPython
nWedges: numberOfWedges
xyList: aCollection
"List of XY (XZ) points that define surface of revolution."
Hum-UI -- HumRowLayoutWidget
asHTML
"Generate a div containing child widget renderings."
^html.
***22 lines of code ***
asMorph
^morph.
Hum-UI -- HumScene
asThreeJS
"Render the scene as ThreeJS"
"Prolog: Create the ThreeJS scene with appropriate attributes."
"Render the content (layers or objects)"
"Append the epilog."
^js.
asThreeJSGeometry
"Render the assembly as ThreeJS geometry"
"Render the content (layers or objects)"
^js.
asThreeJSinHTML
"Wrap ThreeJS rendering with HTML5."
"Define a geometry named by (self asCamelCase)."
"Generate additional function to build geometry and insert it into scene."
"Complete the HTML."
^html.
***167 lines of code ***
asVPython
"render scene and the objects in it via VPython."
^ pythonCode.
asVPythonPreamble
^ pythonCode.
jump: aTime
"TODO: Is this consistent with HumSimulator?"
setupFloor4ThreeJS
"Provide boilerplate that creates a visible floor."
"NOTE: JavaScript must call setupScene() before setupFloor()."
"TODO: Parameterize the size of the floor."
^ js.
setupScene4ThreeJS
""
^js, String cr.
***29 lines of code ***
Hum-UI -- HumSolid
asPolygons
"Translate each face into a list of 3D points."
^polygons ifNil: [ polygons := self asPolygonsColoredBy: [ self solidColor ] ].
asPolygonsColorCoded
"Color code the facets of the solid."
^self asPolygonsColoredBy: [ self nextColor ].
asPolygonsColoredBy: aColorRule
"Generate polygons from the solid`s dimension. - Subtypes should over-ride."
"Color by evaluating the given color rule block."
"Hum coordinates are plan view. X points East. Y points North. Z points up."
"North surface "
"East surface"
"West surface"
"Bottom surface"
"Top surface"
"South surface"
"TODO: What is meaning of polygons instance variable if we return something else here?"
"TODO: If a canvas is attached to a face (e.g. billboard), it needs to be rendered."
^tiltedPolygons.
***72 lines of code ***
asThreeJS
"Render this solid as a cube via three.js"
"Note: Caller must merge this into a scene or group geometry"
"TODO: *** Implement Subtypes ***"
^js.
***28 lines of code ***
asVPython
^pythonCode
asVPythonPosition
"Generate VPythgon code giving position."
^centerString.
asVPythonThing
"A solid has color and is visible."
^pythonCode
asX3D
"Return a string in X3D notation representing this box / thing.
"
"TODO: Replace this with a template implementation"
^x3d.
***25 lines of code ***
attachCanvas: aCanvas toFace: aSymbol
"Attach the canvas to the face. -- Used for billboards.
color
^solidColor ifNil: [ solidColor := Color gray. ].
color: aColor
"What id the default (background) color of the surface and interior of this solid 3D object?"
density
"Return set density otherwise lookup the density of my material."
^ density ifNil: [ (self densityOfMaterial) ].
density: aMeasure
"What is the average density (mass per cube) of this solid?
"
"HumMeasure handles conversions to KMS units.
"
densityOfMaterial
"The table is held on the class side to avoid clutter and instance bloat."
^result.
faces
"Hold image/canvas to be attached to a face."
^faces ifNil: [ faces := Dictionary new. ]
initialize
mass
^ mass ifNil: [ mass := (self volume) * (self density)].
mass: aMeasure
"What is the mass of this object?"
"HumMeasure handles conversions to KMS units.
"
material
^ material ifNil: [ Error signal: 'Material has not been set for this solid'].
material: aString
"See also: #densityOfMaterial for names of standard materials. "
solidColor
^solidColor ifNil: [ solidColor := Color gray. ]
type: aSymbol
"TODO: Why was this coded?
weight
"Get the Earth-bound weight of the object. (in Newtons)."
^ ( self mass ) * ( 1.0 gravity ).
wireFrameColor
^wireFrameColor ifNil: [ wireFrameColor := Color black ].
x3dColor
"Translate my Smalltalk Color to x3dColor string"
^result.
x3dExampleJSON
"Following is here to hold some useful patterns while I think over the design strategy."
"html": {
"-xmlns": "http://www.w3.org/1999/xhtml",
"head": {
"meta": [
"-http-equiv": "X-UA-Compatible",
"-content": "chrome=1"
"-http-equiv": "Content-Type",
"-content": "text/html;charset=utf-8"
"title": "Primitives: Box, Cone, Cylinder and Sphere Primitives",
"link": {
"-rel": "stylesheet",
"-type": "text/css",
"-href": "x3dom.css"
"body": {
"h1": "Primitives: Box, Cone, Cylinder and Sphere Primitives",
"p": [
"-class": "case",
"X3D": {
"-xmlns": "http://www.web3d.org/specifications/x3d-namespace",
"-id": "boxes",
"-showStat": "true",
"-showLog": "false",
"-x": "0px",
"-y": "0px",
"-width": "400px",
"-height": "400px",
"Scene": {
"Background": { "-skyColor": "1 1 1" },
"Transform": [
"-DEF": "coneTrafo",
"-translation": "-4.5 0 0",
"Shape": {
"-DEF": "coneShape",
"Appearance": {
"-DEF": "coneApp",
"Material": {
"-diffuseColor": "0 1 0",
"-specularColor": ".5 .5 .5"
"Cone": { "-DEF": "cone" }
"-DEF": "boxTrafo",
"-translation": "-1.5 0 0",
"Shape": {
"-DEF": "boxShape",
"Appearance": {
"-DEF": "boxApp",
"Material": {
"-diffuseColor": "1 0 0",
"-specularColor": ".5 .5 .5"
"Box": { "-DEF": "box" }
"-DEF": "sphereTrafo",
"-translation": "1.5 0 0",
"Shape": {
"-DEF": "sphereShape",
"Appearance": {
"-DEF": "sphereApp",
"Material": {
"-diffuseColor": "0 0 1",
"-specularColor": ".5 .5 .5"
"Sphere": { "-DEF": "sphere" }
"-DEF": "cylinderTrafo",
"-translation": "4.5 0 0",
"Shape": {
"-DEF": "cylinderShape",
"Appearance": {
"-DEF": "cylinderApp",
"Material": {
"-diffuseColor": "1 1 0",
"-specularColor": ".5 .5 .5"
"Cylinder": {
"-DEF": "cylinder",
"-radius": "1.0",
"-height": "2.0"
"Viewpoint": {
"-centerOfRotation": "0 0 0",
"-position": "0 0 15",
"-orientation": "0 1 0 0"
"-class": "case",
"#text": " "
"script": {
"-type": "text/javascript",
"-src": "x3dom.js"
^ json.
***129 lines of code ***
x3dExampleXML
"Example to aid design
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
^xml.
***74 lines of code ***
x3dMaterial
"Return X3D element for appearance/material of this color and opacity.
"
^x3d.
x3dMaterialColorRed: red green: green blue: blue alpha: alpha
"Return X3D element for appearance/material of this color and opacity."
"All of the arguments are between zero and one."
^x3d.
x3dShape
"Produce X3D XML shape element"
"Check that my typeOfSolid instance variable is x3d compatible."
^x3d.
x3dShape: typeOfShape diffuseColor: diffuseColor specularColor: specularColor
"Produce X3D XML shape element - override instance variable color?"
^x3d.
***23 lines of code ***
Hum-UI -- HumSpace
asPolygons
"Return an empty collection of polygons - HumSpace is not drawn. It is used for spacing in layout logic."
^ OrderedCollection new.
asPolygonsColorCoded
"Return an empty collection of polygons - HumSpace is not drawn. It is used for spacing in layout logic."
^ OrderedCollection new.
asVPythonThing
"A space has no color and is not visible."
^pythonCode
Hum-UI -- HumStringWidget
asHTML
"Generate HTML input element"
^html.
asMorph
^morph.
renderContentOn: aWAHtmlCanvas
"render self via a simple input tag"
Hum-UI -- HumSurface
about
"
"
"2016-11-01:
"
***33 lines of code ***
addShape: aHumSurface
asBillBoard
"Convert the surface to a thin HumBox, facing South, hung at eye-level."
"Note: Dimensions given in pixels will be coverted to millimeters."
"Draw children, if any, on canvas"
"TODO: Position the part on the billboard"
"Attach the canvas to the South face of the billboard."
^billboard.
***25 lines of code ***
asHTML
" Render surface as HTML"
^html.
asHtmlCanvasOffsetX: offsetX y: offsetY
"Return a HTML <rect . . . /> element for this surface."
"Don't scale dimensions in this version"
^xml.
***29 lines of code ***
asMeasure: aQuantity
"Require internal consistency."
^measure
asMorph
^result.
asSVG
"Generate the opening <svg . . . > element."
^svg.
asSvgRect
"Return a SVG <rect . . . /> element for this surface."
"TODO: Determine what SVG scale and transpose should be applied to this surface's rectangle."
"TODO: Order the shapes by layer."
^xml.
***24 lines of code ***
asSvgRectOffsetX: offsetX y: offsetY
"Return a SVG <rect . . . /> element for this surface."
"Don't scale dimensions in this version"
^xml.
***28 lines of code ***
asSvgViewBox
"Set up standard attributes for the svg prolog."
^svg.
***25 lines of code ***
asXML
^xml.
asXMLRectOffsetX: offsetX y: offsetY
"Return a hum <surface . . . /> element for this surface."
^xml.
***27 lines of code ***
backgroundColor
^ backgroundColor ifNil: [backgroundColor := Color gray ].
backgroundColor: aColor
"Set color to be used when background is rendered."
bbBottom
"Find my bounding box edge."
^myEdge.
bbEdge: aSymbol
"Find my bounding box edge.
^myEdge.
bbHeight
"Find my bounding box edge."
^bbHeight.
bbLeft
"Find my bounding box edge."
^myEdge.
bbRight
"Find my bounding box edge."
^myEdge.
bbTop
"Find my bounding box edge."
^myEdge.
bbWidth
"Find my bounding box edge."
^bbWidth.
borderColor
"What color is my border, ifany?"
^borderColor ifNil: [ borderColor := Color black ].
bottom
^ bottom ifNil: [ self bottom: 0 meter ].
bottom: aNumber
"Reset the bottom edge."
"Force top edge to be bottom + height"
canvas
"Attach a canvas - for placing drawings and images on the surface"
^canvas ifNil:[ canvas := HumCanvas new ].
defaultUnits
^defaultUnits ifNil: [ defaultUnits := 'px' ].
defaultUnits: aSymbol
^defaultUnits := aSymbol.
drawOn: aHumCanvas
"Draw self on the given canvas."
expandToFit
fillColor
"What color is my fill, ifany?"
^fillColor ifNil: [ fillColor := Color gray ].
generateHumScript
"Proof of concept: Generate Hum code."
^script.
height
"What is the height of this object?
"
^ height ifNil: [ self height: 0 meter ].
height: aNumber.
"Reset the distance between top and bottom edges."
"Force the bottom to be the top minus the height."
id
^ id
id: aString
initialize
initialize: units
"Reset #pixel to #px as needed.
"
***21 lines of code ***
layer
"What layer is the surface in?
"
"By default, a surface is in layer zero."
^ layer ifNil: [ layer := 0 ].
layer: aNumber
left
^ left ifNil: [ self left: 0 meter ].
left: aNumber
"Reset the left edge."
"Force the right edge to keep width constant."
origin
"a zero-size object positioned at ( left top layer ) = ( 0 0 0 )"
^ origin ifNil: [ origin := HumSurface new. ].
overlay: aHumSurfaceB onTopOf: aHumSurfaceA
"Both shapes are assumed (forced) to be present in my collection."
"By convention, surface B will be aligned with A's top and left edges."
"By convention, surface B will be placed in a higher numbered layer."
"Note: If there already was already another shape on top and in same layer,
place: aHumSurfaceB above: aHumSurfaceA
"Place B above A on the surface.
"Assure that A and B are in my collection."
"By convention, set B's bottom will be equal to A's top.
"By convention, B is now in the same layer as A."
place: aHumSurface at: anArray
place: aHumSurfaceB below: aHumSurfaceA
"Place B below A on the surface. (Not to be confused with putting B on a different layer.)"
"TODO: Consider making calls to top: right: left: using blocks (closures) so that everything is dynamic.
"
"Assure that A and B are in my collection."
"By convention, set B's top to be equal to A's bottom.
"By convention, B is now in the same layer as A."
place: aHumSurfaceB leftOf: aHumSurfaceA
"Place B left of A on the surface. "
"Assure that A and B are in my collection."
"By convention, set B's left to be equal to A's right.
"By convention, B is now in the same layer as A."
place: aHumSurfaceB rightOf: aHumSurfaceA
"Place B right of A on the surface. "
"Assure that A and B are in my collection."
"By convention, set B's right to be equal to A's left.
"By convention, B is now in the same layer as A."
right
^ right ifNil: [self right: 0 meter ].
right: aNumber
"Reset the right edge."
"Force the left edge to keep the width constant."
shapes
"I remember the 2d objects placed on me."
^ shapes ifNil: [ shapes := Set new. ].
title
^ title ifNil: [ self id ].
title: aString
top
^ top ifNil: [ top := 0 ].
top: aNumber
"Reset the top edge."
"Force the bottom edge to keep the height constant."
width
^ width ifNil: [ self width: 0 meter. ]
width: anObject
"Reset the width.
"Force the right edge to be consistent."
Hum-UI -- HumTextPrettyPrinter
addCommentToEndOfLineStartsWith: aString
parse: aHumTextLine
"delimiters := (' ', startCommentToEndOfLine )."
^ ppTokens.
Hum-UI -- HumTextPrettyToken
string
^ string ifNil: [ string := String new. ].
string: aString
Hum-UI -- HumTextWidget
asHTML
"Generate HTML textarea element"
^html.
asMorph
"Instantiate a TextMorph of some kind."
"Set some visual properties."
"TODO: Wire up the UI interaction:
^morph.
renderContentOn: aWAHtmlCanvas
"render self via a text area tag"
rows
"How many rows should we display?"
^ rows
rows: aSmallInteger
"How many rows should we display?"
Hum-UI -- HumTurtle
headEast
headNorth
headSouth
headWest
heading
^heading ifNil: [ heading := (0 degrees) ].
heading: compassHeading
"North is 0 degrees. East is 90 degrees. West is minus 90. South is 180."
initialize
"The initial turtle position is at origin (0@0) facing North."
"The distance per step is the speed."
"Tail is up - so the turtle is not painting."
position
^ position ifNil: [ position :=<EMAIL_ADDRESS>]
position: aPoint
"Move turtle to aPoint without painting."
speed
"Distance traveled on each step."
^ speed ifNil: [ speed := 1.0 ]
speed: aFloat
"Distance traveled on each step."
step
"Move forward one step"
"Paint using super methods"
"Update position"
tail
^ tail ifNil: [ tail := #up ].
tail: aSymbol
"tail = #up means no paint, otherwise lines are drawn with tailColor."
tailColor
"What color am I painting at this time?"
^ self brushColor. "Note: I am a subclass of HumCanvas."
tailColor: aColor
"What color am I painting at this time?"
^ self brushColor: aColor. "Note: I am a subclass of HumCanvas."
turn: degreeIncrement
"Change heading by given amount."
turnLeft
turnRight
Hum-UI -- HumVR
addScene: aHumScene
jump: aTime
"Execute equations of motion, etc."
"TODO: Make compatible to HumSimulator."
jumpTime
"Get the latest VR-world time. This is set by the last time-jump. See: #jump: "
^jumpTime.
jumpTime: aTime
"Set the VR-world time. (Use to synchronize state across scenes) - called from #jump:"
scenes
"A VR world has one or more scenes identified and accessed by their IDs. "
^ scenes ifNil: [ scenes := Dictionary new ].
start
"Start stepping."
stop
"Stop stepping"
Hum-UI -- HumViewPortMorph
camera
^camera.
handleKeystroke: anEvent
"TODO: Add ability to roll the camera."
***33 lines of code ***
handlesMouseOver: evt
^true.
mouseEnter: anEvent
mouseLeave: anEvent
viewPort
^ viewPort
viewPort: aHumViewPort
Hum-UI -- HumViewPort
asMorph
^morph.
camera
"Which camera (in the scene)?"
^camera ifNil: [ Error signal: 'Viewport needs a camera.' ]
camera: aCamera
"Which camera (in the scene)?"
cameraCanSeePolygon: aHumPolygon
"The camera can see the polygon
"Delegate to camera (HumCamera)"
^false.
changed
getPolygonsForSolids: aCollectionOfSolids
"Return polygons corresponding to the surfaces of the given solids."
"NOTE: These polygons are not transformed."
^polygons.
getPolygonsForSolids: aCollectionOfSolids colorRule: aOneArgumentBlock
"Return polygons corresponding to the surfaces of the given solids."
"NOTE: These polygons are not transformed."
^polygons.
mapPolygonsFrom3Dto2D
"Each solid in the scene provides a collection of polygons with points in 3D scene coordinates.
^viewportPolygons.
mapPolygonsFrom3Dto2DcolorCoded
"Each solid in the scene provides a collection of polygons with points in 3D scene coordinates.
"Project onto camera frustrum"
"TODO: Cull faces that are behind the camera."
"TODO: Sort faces to draw those that are far from camera under those that are close."
^viewportPolygons.
***32 lines of code ***
mapPolygonsToViewPort: aCollectionOfPolygons
"Map from 3D to 2D"
^viewportPolygons
mapToCanvas: aHumCanvas bounds: aRectangle
"Declare where to draw me. Drawing is defered. See . . ."
"TODO: These declarations should affect asMorph."
mapTrianglesFrom3Dto2D
"Each solid in the scene provides a collection of polygons with points in 3D scene coordinates.
^viewportPolygons.
paintHumPolygon: aHumPolygon
"The HumPolygon may contain 3D points and specifies fill and border colors.
paintScene
"Render solids in my scene as polygons projected onto my canvas."
"Solid faces are 3D polygons. Project to 2D viewport canvas."
paintSceneAsTriangles
"Render solids in my scene as polygons projected onto my canvas."
"Solid faces are 3D polygons. Project to 2D viewport canvas."
paintSceneColorCoded
"Render solids in my scene as polygons projected onto my canvas."
^ self renderSceneAsTriangles.
projectPolygon: aScenePolygon
"Return a new polygon with the points transformed into camera`s coordinate system."
"Initialize polygon colors"
"Get camera depth"
^transformedPolygon.
projectScenePoint: aViewPoint cameraDepth: aCameraDepth
"Translate from camera view coordinates (meters) to canvas coordinates (px)"
"Map East-West to x; North-South to y; Up-Down to z, Time to w."
^aCanvasPoint.
***23 lines of code ***
projectionMode
"Map the scene polygons onto the viewport using orthogonal or perspective projection?"
^ projectionMode ifNil: [ projectionMode := #perspective ]
projectionMode: aSymbol
renderScene
"Render solids in my scene as polygons projected onto my canvas."
^self renderSceneAsTriangles.
renderSceneAsTriangles
"Render solids in my scene as polygons projected onto my canvas."
"Solid faces are 3D polygons. Project to 2D viewport canvas."
renderSceneAsWireFrame
"Render solids in my scene as polygons projected onto my canvas."
"Solid faces are 3D polygons. Project to 2D viewport canvas."
repaint
"Repaint using stored block."
repaint: aBlock
"Which method to use when repainting?"
scalePixelsPerMillimeter
^pixelsPerMillimeter ifNil: [ pixelsPerMillimeter := (5 px) / (1 millimeter) ].
scalePoint: aScenePoint scaleRatio: pxPerMeter
"Return a x@y point by scaling the given scene point"
^ canvasX @ canvasY.
***21 lines of code ***
scene: aScene
selectSolidsInFrontOfCamera
"Return collection of solids whose centers are in front of camera."
"Explode each assembly to get constituent solids."
^cameraSolids.
transformPointIntoCameraFrame: aPoint3D
"Transform the point into the camera`s coordinate system."
"Translate"
"Rotate"
"Tilt"
^HumVector newFrom: { cameraX. cameraY. cameraZ. }.
***42 lines of code ***
transformPolygonToCameraFrame: aScenePolygon
"Return a new polygon with the points transformed into camera`s coordinate system."
"Initialize polygon colors"
"Get camera depth"
^transformedPolygon.
update: anObject
"Something in my model has been changed."
"Transcript cr; show: 'Scene changed.'."
zmapPolygonsFrom3Dto2D
"Each solid in the scene provides a collection of polygons with points in 3D scene coordinates.
"Define the function we use to may from 3D to camera pixel point."
"Paint distant objects before those that are near."
^viewportPolygons.
***23 lines of code ***
zrenderScene
"Render solids in my scene as polygons projected onto my canvas."
"Solid faces are 3D polygons. Project to 2D viewport canvas."
Hum-UI -- HumView
asWidget
"Initialize a HumFormWidget for this view"
^formWidget ifNil: [ formWidget := HumFormWidget onView: self]
blackboard
^ blackboard ifNil: [ Error signal: 'No blackboard has been assigned to this view.'].
blackboard: aHumBlackBoard
calc
"Create a calculator to be shared . . ."
^ calc ifNil: [ calc := HumCalculator new ].
entityName
"get"
^entityName ifNil: [Error signal: 'No entity name has been set for this view.']
entityName: aString
"Set"
interpretEmphasisIn: aString on: aWAHtmlCanvas
"TODO: THIS IS A STUB - Expect aString contains Hum Markup."
"See: HumMarkupLine >>generateCodeOfType: aSymbol fromTokens: tokens at: xToken"
"See: HumOntologyViewer >>renderMarkupAsHTML5: markupSource"
"See: HumOntologyViewer >>renderMarkupEmphasisAsHTML5: aString "
"TODO: REFACTOR."
"TODO: Markup rendering seems to be missing tests."
ontology: aHumOntology
renderFrameLine: aHumMarkupLine viaSeasideCanvas: aWAHtmlCanvas
"Maintain spacing."
"Is this markup line a heading?"
"If this is a heading, render the whole line as a heading. "
"Call self recursively to catch any additional emphasis (e.g. italics)"
"Is this markup line a bullet/numbered list item."
"TODO: Figure out how to emit '</ul>' and '</ol>.' -- Might need MODES. (heavens)"
^html.
"TODO: AT THIS POINT - OUTPUT UP TO NEXT MARK-UP"
"Default type is a simple string"
"Check for special types"
***99 lines of code ***
renderMarkupLinesViaSeasideOn: aWAHtmlCanvas
"Render the ontology view frame lines via Seaside"
"self assert: ( aWAHtmlCanvas isKindOf: WAHtmlCanvas )."
renderUpToNextWidget: aMarkupString on: html
"Render mark-up that does not involve heading/list/widget"
"Precondition: Caller has already handled and removed markup for header or list."
"Break up the line. We will only render non-widget stuff."
"TODO: Interpret emphasis -- if any"
^remainder. "TODO: Should this method call itself recursively -- or leave that loop to the caller?"
view
^ viewFrame ifNil: [Error signal: (self class asString),' not initialized']
view: aViewNameString
"Fetch the view frame of that name."
Hum-UI -- HumWidget
about
" The traditional idea of a widget is that it is a component in a view. (MVC concept)
"
"
"
"
"
" Note: An Avatar may be a kind of widget.
"
" A Scene is mostly decoration, but it may also trigger interaction via proximity triggers.
***26 lines of code ***
asGlamorBrick
"Render widget and data as Glamor Brick object"
asHTML
"Render widget and data as HTML code"
asJSF
"Render widget and data as Jave Server Face code"
asMagritteMorph
"Render widget and data as Magritte Morph object"
asMorph
"Render widget and data as Morph object
asXUL
"Render widget and data as XUL code"
attributeName
^attributeName
attributeName: aString
"name of attribute"
attributeValue
^ attributeValue ifNil: [ '' ].
attributeValue: aString
"Set current value of attribute -- in display/input format."
"See >>store: -- which sets the value and also notifies the blackboard."
blackboard: aHumBlackBoard
canvas
"Canvas on which to draw the widget - "
^canvas ifNil: [ canvas := HumCanvas new. ].
"
canvas: aHumCanvas
"Canvas on which to draw the widget - "
entityName: aString
formCanvas
^self canvas formCanvas.
renderContentOn: aWAHtmlCanvas
"Default: Render self via a simple input tag"
store: anObject
"Set my attribute value and store it on my blackboard."
"TODO: Perhaps this should be #update: method to correspond with other UI controller conventions."
"Note: The blackboard might send the value to it`s world-base, if it has a world-base."
Hum-X
Hum-X -- H3dCamera
depth
"Distance from eye point to viewport rectangle."
^ depth
depth: aHumMeasure
"Distance from eye point to viewport rectangle."
projectScenePointToScreenPoint: aScenePoint
"Map a scene point onto a screen point ( x y z ) ==> ( x' y' z').
"Filter points that are behind the screen."
"Get the rise over run (tangent of angle)."
"Filter points that are not visible."
"Calculate the offset in meters."
"Original y is kept so that we can render overlaping points correctly. "
^screenPoint.
***24 lines of code ***
scene: aScene
"Scene (or layer) the camera is viewing."
Hum-X -- H3dObjectTests
test110buildBox
"Check that dimension were stored."
"Volume"
"Polygons ==> cube faces in this case"
test120yawBox90degrees
"90 degree yaw exchanges X and Y"
test122yawBox90degreesAroundPivot
"90 degree yaw exchanges X and Y"
***22 lines of code ***
test125yawBox180degrees
"180 degree rotations should leave bounds the same."
test130pitchBox90degrees
"90 degree pitch exchanges Y and Z"
test132pitchBox90degreesAboutPivot
"90 degree pitch exchanges Y and Z"
test135pitchBox180degrees
"180 degree rotations should leave bounds the same."
test140rollBox90degrees
"90 degree roll exchanges X and Z"
test142rollBox90degreesAboutPivot
"90 degree roll exchanges X and Z"
test143rollBox90degreesAboutPivot
"90 degree roll exchanges X and Z"
test145rollBox180degrees
"180 degree rotations should leave bounds the same."
test150yawPitchRollBox
"180 degree rotations should leave it looking the same."
test220moveBoxEast
test225moveBoxWest
test230moveBoxNorth
test235moveBoxSouth
test240moveBoxTop
test245moveBoxBottom
test310stepVelocity
test320stepYawRate
"Expect X and Y bounds to exchange."
test325stepVelocityAndYawRate
"Expect X and Y bounds to exchange."
test330stepPitchRate
"Expect Y and Z bounds to exchange."
test335stepVelocityAndPitchRate
"Expect Y and Z bounds to exchange."
test340stepRollRate
"Expect X and Z bounds to exchange."
test345stepVelocityAndRollRate
"Expect X and Z bounds to exchange."
test350stepEverything
"Expect X and Z bounds to exchange."
***23 lines of code ***
test610buildElipsoid
"Check that dimensions were stored."
"The number of polygons should be the square of the numberOfWedges."
"Check that the polygons are in range."
test620yawElipsoid90degrees
"90 degree yaw exchanges X and Y"
test630pitchElipsoid90degrees
"90 degree pitch exchanges Y and Z"
test640rollElipsoid90degrees
"90 degree roll exchanges X and Z bounds"
test710buildRotation
"Check that dimension were stored."
"Check expected bounds"
test711buildRotationAroundX
"Check that dimension were stored."
"Check expected bounds"
test712buildRotationAroundY
"Check that dimension were stored."
"Check expected bounds"
test810buildAssembly
test820stackBoxes
"Part positions are relative to the assembly center."
"Check resulting positions in CONTAINER coordinates."
"Check resulting positions in SCENE coordinates"
***33 lines of code ***
test821stackAndYaw90
"Part positions are relative to the assembly center."
"Check resulting positions in CONTAINER coordinates."
"Check resulting positions in SCENE coordinates"
"Zero yaw should have no effect."
"Yaw 90 degrees and see . . ."
"x and y offsets should exchange"
***49 lines of code ***
test822stackAndPitch90
"Part positions are relative to the assembly center."
"Check resulting positions in CONTAINER coordinates."
"Check resulting positions in SCENE coordinates"
"Zero pitch should have no effect."
"Pitch 90 degrees up and see . . ."
"y and z offsets should exchange"
***49 lines of code ***
test824stackAndRoll90
"Part positions are relative to the assembly center."
"Check resulting positions in CONTAINER coordinates."
"Check resulting positions in SCENE coordinates"
"Zero roll should have no effect."
"Roll 90 degrees and see . . ."
"x and z offsets should exchange"
***49 lines of code ***
Hum-X -- H3dObject
addPart: anH3dObject
"Add a part (or subassembly) to my assembly."
addParts: aPartsList
"Add each part to my set of parts."
assertRadians: anAngleInRadians
assertRadiansPerSecond: radiansPerSecond
axis: anAxisSymbol
"Which axis is rotation around?
^ axis := anAxisSymbol.
borderColor
^ borderColor ifNil: [ borderColor := (self fillColor) lighter. ].
bottom
"Value without yaw, pitch, roll - Use minZ to see value with yaw, pitch, roll."
^ ( center z ) - ( height / 2.0 ).
bottom: aMeasure
"Move so that bottom is at given z value."
buildAndOrient
"Return polygons in scene coordinates.
"To assure consistent results, alway apply in order: yaw, pitch, roll. "
^adjustedPolygons.
buildAssembly
"Build the polygons for the assembly by aggregating and translating polygons from the parts."
^translatedPolygons.
buildBasePolygons
"Return my base polygons. Polygons before pitch, yaw, roll."
^polygons.
buildBox
"Create polygons for a box"
"assemble faces"
"color"
^ polygons.
***53 lines of code ***
buildElipsoid
"Create polygons forming the elipsoid."
"Work from bottom to top"
"color"
^polygons.
***38 lines of code ***
buildRotation
"Given curve and an axis, build a rotation as a collection of polygons."
"Adjust for non-default axis of rotation."
"TODO: Should this be #pitch:aboutPivot: ?? "
"color"
^adjustedPolygons.
***40 lines of code ***
center
^ center ifNil: [ center := (HumVector newFrom: { 0.0 meter. 0.0 meter. 0.0 meter. } ) ].
center: aVector
"Set my center in container coordinates."
clearance
"Default value for clearance is one millimeter."
^clearance ifNil: [ clearance := 0.001 meter ].
curve: xyPoints
"Curve to use when building a rotation.
east
"Value without yaw, pitch, roll - Use maxX to see value with yaw, pitch, roll."
^ ( center x ) + ( width / 2.0 ).
east: aMeasure
"Move so that east edge is at the given value."
fillColor
^ fillColor ifNil: [ fillColor := Color gray. ].
height
"What is my Up-Down height? (prior to pitch, yaw, roll).
^ height ifNil: [ Error signal: 'height dimension has not been set' ].
height: aHeight
"What is my Up-Down height? (prior to pitch, yaw, roll).
initialize
"Set initial position, orientation, velocity, and rotation rates to zero."
length
"What is my North-South length? (prior to pitch, yaw, roll)
^ length ifNil: [ Error signal: 'length dimesion has not been set' ].
length: aLength
"What is my North-South length? (prior to pitch, yaw, roll)
maxX
^ v.
maxY
^ v.
maxZ
^ v.
minX
^ v.
minY
^ v.
minZ
^ v.
move: aH3dObject toMyCoordinate: aHumVector
north
"Value without yaw, pitch, roll - Use maxY to see value with yaw, pitch, roll."
^ ( center y ) + ( length / 2.0 ).
north: aMeasure
"Move so that north edge is at given value."
numberOfWedges
"Number of wedges to produce when drawing rotation or elipsoid."
^ numberOfWedges ifNil: [ numberOfWedges := 12 ].
numberOfWedges: anInteger
parts
"Return my set of parts/subassemblies - each part is unique - hence a member of a set."
^ parts ifNil: [ parts := Set new. ].
pitch
"Amount of current pitch = rotation about x-axis"
^ pitch ifNil: [ pitch := 0.0 radian ].
pitch: anAngleInRadians
"Amount of current pitch = rotation about x-axis"
pitchRate: randiansPerSecond
"pitch rate (angular velocity) "
pivot
"Return the pivot in scene coordinates."
^pivot
pivotPoint
"Pivot-point is relative to object`s center.
^pivotPoint ifNil: [ pivotPoint := HumVector zeroVector: #meter ].
pivotPoint: aVector
"Pivot-point is relative to object`s center.
place: aH3dObjectA onTopOf: aH3dObjectB
"Position so that bottom matches top with a little clearance."
polygons
^polygons
roll
"Amount of current roll. = rotation about y-axis"
^roll ifNil: [ roll := 0.0 radian ].
roll: anAngleInRadians
"Amount of current roll. = rotation about y-axis"
rollRate: randiansPerSecond
"roll rate (angular velocity) "
south
"Value without yaw, pitch, roll - Use minY to see value with yaw, pitch, roll."
^ ( center y ) - ( length / 2.0 ).
south: aMeasure
"Move so that south edge is at given value."
step: aTimeIncrement
"Step the position and orientation."
"self assert: ((aTimeIncrement isKindOf: HumMeasure) and: [ aTimeIncrement dimensions = { #second->1. } ] )."
"Always do yaw, pitch, roll in that order."
"Update:"
top
"Value without yaw, pitch, roll - Use maxZ to see value with yaw, pitch, roll."
^ ( center z ) + ( height / 2.0 ).
top: aMeasure
"Move so that top is at given z value."
type: aType
"What type of 3D object am I?"
velocity: aVector
"Set my velocity in container coordinates."
volume
"Return volume of box."
^volume.
west
"Value without yaw, pitch, roll - Use minX to see value with yaw, pitch, roll."
^ ( center x ) - ( width / 2.0 ).
west: aMeasure
"Move so that west edge is at the given value."
width
^ width ifNil: [ Error signal: 'width has not been set' ].
width: aWidth
"What is my East-West width? (prior to pitch, yaw, roll)
yaw
"Amount of current yaw. = rotation about z-axis"
^ yaw ifNil: [ yaw := 0.0 radian ].
yaw: anAngleInRadians
"Amount of current yaw. = rotation about z-axis"
yawRate: randiansPerSecond
"yaw rate (angular velocity) = rotation about z-axis"
Hum-X -- H3dPath
= anotherPath
"Are the two paths equal."
"Are they the same size?"
^result.
addVertex: xyzCoordinates
allButFirstDo: aBlockClosure
^self vertices allButFirstDo: aBlockClosure.
at: anInteger
"Return the vertex at: ..."
^vertex.
borderColor
^ borderColor ifNil: [ borderColor := (self fillColor) lighter ].
borderColor: aColor
"Color to use when rendering path (polygon edges)."
do: aBlockClosure
^self vertices do: aBlockClosure.
fillColor
^ fillColor ifNil: [ fillColor := Color gray ].
fillColor: aColor
"Color to use when rendering path as a polygon"
first
^ points at: 1.
last
^ points last.
max: aBlockClosure
^self vertices max: aBlockClosure.
pitch: pitchAngle
"Return a new path with my points adjusted by pitch about origin."
^newPath
pitch: pitchAngle aboutPivot: aPivot
"Return a new path with my points adjusted by pitch about origin."
^newPath
roll: rollAngle
"Return a new path with my points adjusted by roll about origin."
^newPath
roll: rollAngle aboutPivot: aPivot
"Return a new path with my points adjusted by roll about origin."
^newPath
size
^ self vertices size.
translateBy: aHumVector
"Return a path with vertices translated by the given vector."
^instance.
translatedBy: aHumVector
"Return a new path with my vertices translated by the given vector"
"This is just a synonym"
^self translateBy: aHumVector.
vertices
^ vertices ifNil: [ vertices := OrderedCollection new ].
yaw: yawAngle
"Return a new path with my points adjusted by yaw about origin."
^newPath
yaw: yawAngle aboutPivot: pivot
"Return a new path with my points adjusted by yaw about origin."
^newPath
Hum-X -- H3dViewPortTests
test110CreateCamera
"A camera is a 3d-object. Dimensions refer to virtual viewport and eye-point."
"A camera has a position in a scene."
"A camera has an orientation."
"Camera views scene"
test120ProjectScenePointToCameraViewPort
"A camera is a 3d-object with dimensions of ..."
"For this test the orientation is level with no yaw."
"Test private method ..."
test130PitchCamera
"A camera is a 3d-object with dimensions of ..."
"For this test the orientation is level with no yaw."
"Test private method ..."
"Pitch the camera up a little."
test140RollCamera
"A camera is a 3d-object with dimensions of ..."
"For this test the orientation is level with no yaw."
"Test private method ..."
"Roll the camera 90 degrees."
test150YawCamera
"A camera is a 3d-object with dimensions of ..."
"For this test the orientation is level with no yaw."
"Test private method ..."
"Yaw the camera a little."
test160TranslateCamera
"A camera is a 3d-object with dimensions of ..."
"For this test the orientation is level with no yaw."
"Test private method ..."
"Yaw the camera a little."
test210CreateViewPort
"A viewport is a view on a scene via a camera in the scene."
"A viewport is mapped onto a surface."
"A viewport scales the camera image."
"A viewport is attached to a camera in a scene."
"A viewport maps points in the camera image to points in the viewport image."
"How much distance does a pixel cover at y distance?"
***21 lines of code ***
Hum-X -- H3dViewPort
camera: anH3dCamera
"The viewport is attached to this camera."
mapScenePoint: aScenePoint
"Map scene point to camera image, camera image to my image."
"The camera returns nil if the point is not visible on its screen, and so do we."
"TODO: Returning nil as a signal is generally a bad idea."
"One of the problems with returning nil, is that the point may be the start of a line."
"Another problem is that I will have to screen for nils in all of the down-stream code."
^viewPoint.
origin: pointOrigin extent: pointExtent
"What is my origin and extent in container coordinates and pixel metrics?"
"As a practival matter, viewports dimensions need to be in the hundreds."
resolutionAt: aDistance
"What is the resolution per pixel at given distance"
^resolution.
scale
^scale ifNil: [ Error signal: 'This viewport`s scale has not been set yet.' ].
scale: measureNumerator per: measureDenominator
"Multiply camera screen coordinates by scale to get my coordinates."
"Expect the numerator to be pixels
Hum-X -- HApplication
handleRequest: aZnRequest
"Return a response for given request"
^response.
handler: aBlockClosure
"Use the block to handle request"
Hum-X -- HBaseTests
test240WorldBaseBacksBlackBoard
"Blackboard calls on World Base to persist events, state-changes."
"Put first name, last name"
Hum-X -- HBase
entities
"Dictionary of (id -> entity)"
^ entities ifNil: [ entities := Dictionary new ].
events
^events ifNil: [ events := Dictionary new ].
putEntity: anEntity attribute: anAttribute value: aValue event: anEvent
"Record entity attribute value"
putEvent: anEvent
"Record the given event in my store."
Hum-X -- HBlackboardTests
test140BlackboardSaveFetch
"A blackboard records events, noun values"
"Put first name"
"Put last name"
"First name is still there"
***24 lines of code ***
test145BlackboardSaveFetchNouns
"A blackboard records events, noun values"
"Put first name"
"Put last name"
"First name is still there"
***26 lines of code ***
test150BlackboardSaveFetchUpdate
"A blackboard records events, noun values"
"Put first name"
"Put last name"
"First name is still there"
"==========="
"Put first name"
"Put last name"
"First name is still there"
***45 lines of code ***
test160BlackboardToStream
"A blackboard records events, noun values"
"Put first name"
***23 lines of code ***
Hum-X -- HBlackboard
asStream
"Show the values in the blackboard on a stream."
^stream.
events
^ events ifNil: [ events := OrderedCollection new.]
getEntity: anEntity attribute: anAttribute
^result.
getEntityNamed: aNoun
^ entity.
getNoun: aNoun
^value.
nouns
^ nouns ifNil: [ nouns := Dictionary new ].
putEntity: anEntity attribute: anAttribute value: aValue event: anEvent
putEntityNamed: aNoun
^entity.
putEvent: anEvent
worldBase: aWorldBase
"MOCK: Pretend we are persisting values on world base.
"
Hum-X -- HClientServerTests
setUp
tearDown
test110CharacterizeZnHttpClient
"Characterize ZnHttpClient"
"At this point the client has nothing much going on."
test112CharacterizeZnHttpClientNotFound
"Characterize ZnHttpClient"
"At this point the client has nothing much going on."
***47 lines of code ***
test114CharacterizeZnHttpConnected
"Characterize ZnHttpClient"
"At this point the client has nothing much going on."

***48 lines of code ***
test115CharacterizeZnHttpHead
"Characterize ZnHttpClient"
"At this point the client has nothing much going on."
***46 lines of code ***
test116CharacterizeZnHttpConnectExternal
"Characterize ZnHttpClient"
^self].
"At this point the client has nothing much going on."

***52 lines of code ***
test120CharacterizeZnHTTPSocketFacade
"Characterize ZnHttpClient"
"ZnHTTPSocketFacade is stateless.
test190CharacterizeHClient
"HClient is light wrapper on ZnHTTPSocketFacade."
"At this point the client has nothing much going on."
"That`s all folks!"
test210CharacterizeZnServer
test211CharacterizeZnServer
test212CharacterizeZnHTTPSocketFacadeNotFound
"Characterize ZnHttpClient"
test212CharacterizeZnServer
test214CharacterizeZnHTTPSocketFacadeConnected
"Characterize ZnHttpClient"
test216CharacterizeZnHTTPSocketFacadePost
"Characterize ZnHttpClient"
test220CharacterizeZnServerGetResponse
"client := ZnHttpClient new."
***30 lines of code ***
test221CharacterizeZnServerPutResponse
"client := ZnHttpClient new."
***30 lines of code ***
test222CharacterizeZnServerPostResponse
"client := ZnHttpClient new."
***30 lines of code ***
test223CharacterizeZnServerDeleteResponse
"client := ZnHttpClient new."
***30 lines of code ***
test224CharacterizeZnServerHeadResponse
***27 lines of code ***
test226CharacterizeZnHTTPSocketFacadePost
"Characterize ZnHttpClient"
***30 lines of code ***
test310CharacterizeZnRequest
""
***22 lines of code ***
test324CharacterizeZnServerGetResponse
"Use Case: (Single Threaded) Server with HApplication responds to client GET request."
***32 lines of code ***
test325CharacterizeZnServerGetResponse
"Use Case: (Multi-Threaded) Server with HApplication responds to client GET request."
***32 lines of code ***
test326CharacterizeZnServerGetResponse
"Use Case: (Multi-Threaded) Server with HApplication responds to HClient GET request."
***32 lines of code ***
Hum-X -- HClient
clientSettings
^ super settings settings.
Hum-X -- HEntityTests
test110EntityHasAttributes
"An entity has one or more attributes"
"Put first name"
"Put last name"
"First name is still there"
test120SetAttributeValueInEvent
"An entity has one or more attributes"
"Put first name"
"Put last name"
"First name is still there"
***22 lines of code ***
test125EntityPrintOn
"An entity has one or more attributes"
"Put first name"
***21 lines of code ***
test130UpdateAttributeValueInEvent
"An entity has one or more attributes"
"Put first name"
"Put last name"
"First name is still there"
"============"
"Put first name"
"Put last name"
"First name is still there"
***41 lines of code ***
Hum-X -- HEntity
attribute: anAttributeName value: anAttributeValue
"Initialize entity-attribute value. (No event, no history)
"
attribute: anAttributeType value: aValue event: anEvent
"Record a state-change associated with the given event."
attributes
"Return my dictionary of current attribute values."
^ attributes ifNil: [ attributes := Dictionary new ].
getAttribute: anAttributeName
"What is the value of the given attribute?"
^result.
history
"Return history of state-changes."
^ history ifNil: [ history := OrderedCollection new].
id
^ id
id: aLargePositiveInteger
"Set unique identifier.
printOn: aStream
"Format my data for easy reading.
"
"Put my name/title on the stream"
"Append indented list of my attribute values to stream."
"TODO: Handle attributes that refer to other entities."
title
"Entity should be given a contextually unique name (noun)"
^ title ifNil: [ Error signal: 'unknown entity'].
title: aString
"Set my title - something appropriate to usage and unique within the context.
"
Hum-X -- HEvent
> otherEvent
^result.
attributes
id: aLargePositiveInteger
what: aWhat
"What happened? (Relate to business process event.)"
when
^ when
when: aTimeStamp
"When did the event occur? Real clock or simulated clock"
where: aWhere
"Where did event occur? - Test/Simulation/Host/Application/Service"
who: aWho
"Who caused the event? - User/Robot/Actor/Test"
why: aWhy
"Why did the event occur? - Authorization/JobTicket"
Hum-X -- HGlamourTest
test100ReadMe
"This group of tests follows 'Deep into Pharo - chapter 10' "
test110Page192
"Example at page 192"
test110Page193a
"Example at page 193"
test110Page193b
"Example at page 193"
test110Page194
"Example at page 194"
***23 lines of code ***
Hum-X -- HTimeTests
test110timestampIsBigInteger
""
test120timestampIsUnique
""
"n = 1e4 resembles a database transaction rate.


Getting Started
In this post we are going to integrate over sets of infintismal sections of to calculate the surface area of a sphere. To do this, though, we first need to become acquainted with the following concepts:
- Manifolds
- Neighborhoods
- Topological Space
- Homeomorphisms
This may seem like a lot, but we will actually be able to get through all of these ideas fairly quickly. Furthermore, all of these ideas are heavily interrelated.
The level of mathmatical knowledge necessary for this article to be a fun read is a working familiarity with calculus and at least some proof based math (e.g. linear algebra or abstract algebra).
Manifolds
Let's start with manifolds. Manifolds are a fundamental building block of topology and differential geometry. So what is a manifold?
Definition: Manifold
A Manifold is a topological space, M, where at each point, , a neighborhood around x that is homeomorphic toNo worries if this definition made no sense to you. If you aren't familiar with topology, we need to define a Neighborhood, a Topological Space and a Homeomorphism before the definition of a manifold can become meaningful. I wanted to define a manifold first was so that we have an end goal in mind when we learn about the components of the definition of a manifold. This will also allow us to go full circle.
Let's start with Neighborhoods. When we talk about a neighborhood, we are actually talking about a neighborhood about a point, x. This is because the definition of a neighborhood is relative to some point, x.
Definition: Neighborhood
Suppose we have a point, x, in topological space. N is a Neighborhood of x ifKeep in mind that N needn't be an open set. For example, if N is in and it is defined as points in [-1,1] along the x-axis and points in [-1,1] along the y-axis then there are infinitely many open sets about the point x=(0,0) in N, but N is still a closed set. N could also be an open set, though. For example, if we're still in , if our point is x=(0,0) and N is the set of points spanning (-1,1) in the x-axis and (-1,1) in the y-axis.
- , an open set containing x such that
Not familiar with open sets? Click here.
We mentioned in the definition of a Neighborhood that the point x is in a topological space but we haven't defined a topological space yet. So let's do that next.
Definition: Topological Space
Suppose we have a space, X, with a function N(x) that maps each point to the set of Neighborhoods associated with x. In other words, . X is a Topological Space if it satisfies the following conditions:
- N is a neighborhood of x
- For any is a neighborhood of x
- is a neighborhood of y.
Because that definition of topological spaces is brutally technical, a very simple way of conceptualizing a topological space is a set of points with neighborhoods that act nicely with each other.
Finally we are on to homeomorphisms. Homeomorphisms are built upon the concept of isomorphisms. If you aren't familiar with isomorphisms then briefly skim this article and then this stack exchange post.
Definition: Homeomorphism
A Homeomorphism is a isomorphism between topological spaces.Any manifolds will be homeomorphic if we can continuously mold one into the other. A way of thinking about this is if one manifold were made out of silly putty, can you reshape that silly putty to make another manifold? If you can, those manifolds are homeomorphic.
Calculating the Surface Area of a Sphere
Let's start with the general approach we're going to take here. We are going to break the unit sphere into infintismal sections, dxdy, and then map these sections to . We will then define a homeomorphism between dxdy and our region in . We can use this homeomorphism to determine how we are going to integrate over the sphere.
If you look at the figure of a homeomorphism in the section above, you can think of the surface S as the unit sphere. dxdy is the region that is being mapped to D. D is the region of that we are mapping to. All we need to do is account for how much the sides of that section are being stretched during this mapping. If we apply that stretch factor to dx and dy as we integrate over the region, we will be able to calculate the surface area over our manifold (the unit sphere in this case)
We know that surface area of the unit sphere, . This means that if we were to take the surface area of the top half of a a sphere, it would be . Since the sphere is symmetric across the plane (x, y, z=0), proving that the top half of a sphere equals gives us that the area of the full sphere is .
Let's define a mapping, , from dxdy in to a corresponding region on the surface of the unit sphere.
We know that this mapping, is a homeomorphism. We also know . This is because the curvature of a sphere is constant across all directions. That nice fact allows us to break this problem down into just the x axis. Then we we bring the y axis back in, we know that we will be applying the exact same transformation. So let's solve for alpha.
It's interesting to note how much we've simplified this problem at this point: We've moved to the x-axis of half of our original sphere. We've also moved to a far simpler problem: how do we calculate the length of the arc of the top half of a unit circle by mapping from the line [-1, 1]? Once we have that, we can introduce this mapping back into the y-axis as well to go from an arc length to a surface area. By the way, the reason we are dealing with the line [-1, 1] in R is because -1 and 1 are the end points of the top half of a unit circle.
The formula for a cirlce is . So now we have y in terms of x and we know what the change in y will be as we move along the x. These are useful because for every dx step we take in R we are going to be taking a step along the arc of a circle.
If we want to integrate along dx in R the formula is simply . What about the top half of the unit circle though? For this, we need to map from line length to an arc length. The formula for an arc length of some function f(x) is given by . Using this knowledge we can solve for alpha:
Since we know that , it follows that:
Now that we have alpha, we can solve for the length of the top half of a circle:
Let's multiply this by 2, so that we have the entire length of the circle in the along the x-axis. This gives us
Let's now go back into and include the y axis, so that we are calculating surface area instead of arc length. Keep in mind, though, that calculating surface area is simply calculating the arc length in the x and then calculating the arc length in the y and multiplying these two values together.
We are multiplying each integral by 2 so that we convert the length of the top half of the circle to the full length of the circle in each direction. QED.
Links


§486M-6 Applicability. Any dealer who is otherwise licensed shall comply with the provisions of this chapter as a condition of the dealer's license except as to those statutory conditions of the license which are more restrictive. [L 1982, c 282, pt of §2; am L 1991, c 120, pt of §1]


sun harvest austin texas
Sun Harvest Market in Austin | Sun Harvest Market<PHONE_NUMBER> ...
Find Sun Harvest Market in Austin with Address, Phone number from Yahoo! US Local. Includes Sun . sun-harvest.com. 2917 W Anderson Ln, Austin, TX 78757 .
http://local.yahoo.com/info-19422908-sun-harvest-market-austin?csz=Austin%2C+TX
Sun Harvest - Austin, TX
6 Reviews of Sun Harvest "Coming from San Diego, I always shopped at Henry's Farmers Market, and one of the thought I had when moving to Austin was "man, .
http://www.yelp.com/biz/sun-harvest-austin
Sun Harvest Farms - Austin, Texas - Yahoo! Travel
Sun Harvest Farms, Austin - find photos, descriptions, maps, reviews, and expert advice on Yahoo! Travel.
http://travel.yahoo.com/p-travelguide-2741843-sun_harvest_farms_austin-i
Things You'll Need
- Certified copies of public records evidence in your case
Instructions
-
-
1
Sun Harvest Austin, TX, 78757 - YP.com
May 19, 2008 . Get directions, reviews, payment information on Sun Harvest located at Austin, TX. Search for other Health & Diet Food Products in Austin.
http://www.yellowpages.com/austin-tx/mip/sun-harvest-12610923TEXAS - Austin - South Lamar in Austin, TX - Sprouts Farmers Market
Visit Sprouts Farmers Market in Austin, TX for natural foods you can afford. Sprouts is your local grocery store featuring fresh, organic and healthy foods in .
http://sprouts.com/stores/texas-austin-south-lamar -
2
Sun Harvest Market - 2917 W Anderson Ln Austin, TX, 78757
Reviews and ratings of Sun Harvest Market at 2917 W Anderson Ln Austin, TX, 78757. Get phone numbers, maps, directions and addresses for Sun Harvest .
http://linktown.kvue.com/biz/sun-harvest-market/austin/tx/78757/11717172Sun harvest in Austin, TX | Austin Sun harvest - YP.com
2 listings of Health & Diet Food Products in Austin on YP.com. Find reviews, directions & phone numbers for the best sun harvest in Austin, TX.
http://www.yellowpages.com/austin-tx/sun-harvest -
-
3
Sun Harvest Farms (closed) in Austin, TX - Reviews and Directions
Sun Harvest Farms (closed) in Austin, TX. Come to Citysearch® to get information, directions, and reviews on Sun Harvest Farms (closed) and other Health Food .
http://austin.citysearch.com/profile/10237715/austin_tx/sun_harvest_farms.html -
4
Texas TX Natural Food Store Locations
Anderson Sun Harvest Farms, 2917 W Anderson Lane, Austin TX 1-512-451- 0669View . Austin. Austin Sun Harvest Farms, 4006 S. Lamar Blvd, Austin TX .
http://www.allstays.com/c/natural-food-stores-texas-locations.htmSun Harvest » Capital Area Food Bank of Texas Blog
Nov 12, 2010 . Look for donation boxes at Austin-area Greater Texas Federal Credit Union locations. . Sun Harvest Help Us Bag Hunger Food Drive .
http://www.hungerisunacceptable.com/blog/tag/sun-harvest/
-
1
References
Resources
- Photo Credit Justice image by MVit from midas jobs in north carolina


Client Satisfaction Feedback Form
Name:
Email:
Mobile Number:
Did the final result of work meet your expectations ?
Would you recommend VERY GOOD BUILDING & DEVELOPMENT CO. to a friend?
What would you like to see improved? (Check all that apply)
Any comments or suggestions?


Python, ROS and Gazebo, Machine learning, HTML, CSS, Javascript, Docker, websocket, Git
Linux environment, Open source development, full stack development, Data Science with python


Any button can add an icon on the left or right
Share to WeChat Login with QQ account Favorites
The rounded button can be realized by adding the value of class
.btn-rounded
Default
primary
Achievements
Information
Warning
Dangerous
Dangerous
Rounded corner block-level button with icon


Hello {{ user.name }}!
We believe that this post does not fit the main topic of EnergyUse.
{{ comment }}
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
Cheers!


| ID | Variable | Unit |
|---|---|---|
| 1. | Surface fluxes | --- |
| (a) | incident solar (shortwave) radiation | Joules m-2 |
| (b) | reflected solar (shortwave) radiation | Joules m-2 |
| (c) | upward terrestrial (longwave) radiation | Joules m-2 |
| (d) | downward terrestrial (longwave) radiation | Joules m-2 |
| (e) | sensible heat flux | Joules m-2 |
| (f) | latent heat flux (evapotranspiration) | Joules m-2 |
| (g) | heat flux from the atmosphere into the model domain below the atmosphere | Joules m-2 |
| (h) | convective precipitation | mm |
| (i) | stable precipitation | mm |
| (j) | momentum flux into the ground (E-W and N-S components separately) | Joules m-2 |
| 2. | Top-of-atmosphere fluxes | --- |
| (a) | net solar (shortwave) radiation | Joules m-2 |
| (b) | upward terrestrial (longwave) radiation | Joules m-2 |
| 3. | Mass | --- |
| (a) | surface pressure | Pa |
| (b) | sea level pressure | Pa |
| (c) | precipitable water (water vapor only) | mm |
| 4. | Temperature | --- |
| (a) | surface air temperature (2 m level) | K |
| (b) | skin temperature | K |
| ID | Variable | Units |
|---|---|---|
| 1. | Temperature | K |
| 2. | Specific Humidity | kg kg-1 |
| 3. | Zonal (east-west) wind | m s-1 |
| 4. | Meridonal (north-south) wind | m s-1 |
| 5. | Geopotential height | m |
| 6. | Pressure | Pa |
NOTE: Horizontal wind directions are with respect to the earth's latitude-longitude grid.
| ID | Variable | Unit |
|---|---|---|
| 1. | Air temperature at 2 meter elevation | --- |
| (a) | Daily maximum and time of maximum (period: 0 (See Note) - 0 (See Note)) | K, (See Note) |
| (b) | Daily minimum and time of minimum (period: 0 (See Note) - 0 (See Note)) | K, (See Note) |
| 2. | Soil moisture | --- |
| --- | Total amount of water in the soil column at 12 UTC | mm |
| 3. | Runoff | --- |
| --- | Accumulation over prior 24 hours (period: 0 UTC - 0 UTC) | mm |
NOTE: Times of min/max should be reported in seconds after 00 UTC.
| 1. | Latitude and longitude of each point on the model's horizontal grid reported in the same order as the three-hourly output. |
| 2. | The model's vertical coordinate grid |
Return to Workshop II Summary


The New Psalmanazar reminds us of catalogues of lost or imaginary books compiled by Sir Thomas Browne and François Rabelais, which in turn reminded me that for some time I have been planning an exhaustive catalogue raisonné of the out of print pamphlets of Dobson. This would be an inestimable boon to the amateur Dobsonist, unable to gain access to the official archive because they haven't got either a ticket or a key or indeed a clue as to which high Alpine pass it is situated in.
Many, many, many of Dobson's pamphlets have been mentioned in these pages over the years, but even that fragmentary list has never been cobbled together into a coherent whole. Mr Key himself has avoided the task, sad to say, forever devising new and ludicrous excuses, such as flint in the heart or reruns of Daktari. A while ago, there was a suggestion that a team of feral teenagers could be taken off the streets and locked in a bunker until they had compiled a complete list, but it was rightly objected that they could not be trusted to resist appending “innit” to the end of each title. Judicious Tippexing could expunge such desecration, but who would wield the Tippex?
Alas, it seems the Dobson catalogue raisonné may have to join a list of lost or imagined catalogues, alongside such magisterial lists as The Map Reference Points Of 400 Duckponds Mentioned In Binder's Lieder and All Pebblehead's Cravats, Illustrated And Itemised.


I'm looking for a paladin-type fighter who's a good meleer, NOT one of the numerous one-trick smiter ponies. The PW I play on restricts resting to specific sites, thus most adventures are long long fights. So, I don't want to be relying on short-term tricks like divine might and divine shield, or quickly expended abilities like smite evil. Some self buffing wouldn't hurt either. I'm thinking either paladin/wm/cot or cleric/wm/cot. This might end up being a jack of all trades, master of none type build, but that's fine. What do you think?
cleric12/monk12/rog16. Focus on dex and get wis to 20 minimum; epic dodge and scV if you can afford it. Hmm even a druid/monk/rog would be fun then too.
You might want to take a look at these builds.
Self-Righteous Bastard by yours truly.
Pius Custos by Soul Reaper
Battle Cleric by Torias
Hannibal by Firestar Rogue _________________ Two wrongs don't make a right but three lefts do.


[1]
the staff is helpful , friendly helpful , friendly and wonderful .
[2]
the staff was very friendly , great , helpful , friendly helpful , friendly and accomodating and courteous .


make sure you enter your name.
your name must be at least 3 characters.
your name cannot be longer than 20 characters.


Blog update:
- WebSub ✔
- Flickr ✔, but only likes (
https://me.hawx.me/entry/ba11f3aa-4c9b-4544-93d7-2fc74220cbda), and replies at the moment
Vice was good, but I think the "knowing" angle came off annoying where it kind of worked in Big Short. The fake credits were totally crossing the line.
/shrug I couldn't even sign-in, I'd type my URL in but the button wouldn't do anything. To be fair it is hard to tell with Material Design buttons if something has happened when you press them.
HTTP Shortcuts works fine, it just took a bit of setting up.
Now that replies work (
https://me.hawx.me/entry/12020c6f-4fa7-40b3-a4bb-5d458ec650a1), I'm wondering if I should check if the thing I'm replying to has been syndicated so I can reply to the syndicated version when syndicating instead of the thing I'm replying to?
I'm just going to leave this here forever
That was some nice URL encoding. Hopefully this is better?
Hopefully+I+can+now+post+from+my+phone%2C+using+the+HTTP+Shortcuts+app+because+I+can%27t+get+the+login+button+of+indigenous+to+work.+
Just fixed a nice bug found by using omnibear: it posts an empty category if none is set, which tally-ho was storing, but should have really been ignored.
Now I've installed
https://github.com/keithjgrant/omnibear it will be easy to post here. I had to install from the repo because it seems to be gone from Firefox.
My last tweet was actually sent from my new blog
https://me.hawx.me/entry/f95da9e9-74bd-4b21-9e83-ecb91edf92ce. As was this...
That horse show had a good ending
This is just a test of sending webmentions
https://webmention.rocks/test/1, maybe it will work.


Facts to check before India-Bangladesh Test series
by ReutersFactbox on the two-Test series between India and Bangladesh which begins at Indore on Thursday:
Fixtures
First Test - Nov 14-18 - Indore (starts 0400 GMT)
Second Test - Nov 22-26 - Kolkata (starts 0730 GMT)
India
Ranking: First
Captain: Virat Kohli
Coach: Ravi Shastri
Top ranked batsman: Virat Kohli (second)
Top ranked bowler: Ravichandran Ashwin (10th)
Squad: Virat Kohli (captain), Mayank Agarwal, Rohit Sharma, Cheteshwar Pujara, Ajinkya Rahane, Hanuma Vihari, Rishabh Pant, Wriddhiman Saha, Ravichandran Ashwin, Ravindra Jadeja, Kuldeep Yadav, Mohammed Shami, Umesh Yadav, Ishant Sharma, Shubman Gill
Recent form:
Won v South Africa by an innings and 202 runs at Ranchi
Won v South Africa by an innings and 137 runs at Pune
Won v South Africa by 203 runs at Visakhapatnam
Won v West Indies by 257 runs in Jamaica
Won v West Indies by 318 runs in Antigua
Bangladesh
Ranking: Ninth
Captain: Mominul Haque
Coach: Russell Domingo
Top-ranked batsman: Mushfiqur Rahim (36th)
Top-ranked bowler: Mehidy Hasan (25th)
Squad: Shadman Islam, Imrul Kayes, Saif Hassan, Mominul Haque (captain), Liton Das, Mushfiqur Rahim, Mahmudullah, Mohammad Mithun, Mosaddek Hossain, Mehidy Hasan, Taijul Islam, Nayeem Hasan, Mustafizur Rahman, Al-Amin Hossain, Abu Jayed, Ebadot Hossain
Recent form:
Lost v Afghanistan by 224 runs at Chattogram
Lost v New Zealand by an innings and 12 runs at Wellington
Lost v New Zealand by an innings and 52 runs at Hamilton
Won v West Indies by an innings and 184 runs at Dhaka
Won v West Indies by 64 runs at Chattogram
Head-to-head
Matches: 9
India wins: 7
Draws: 2
Last three series:
India beat Bangladesh in lone Test at home in 2017.
Bangladesh drew with India in lone Test at home in 2015.
India beat Bangladesh 2-0 in two-Test away series in 2010.


Keeping track of versions
You work on a project and would like to keep track of what you did. That is why keep old versions of your files. That way you can go back if you messed up beyond recognition.
- Usually that looks like this:
- Or you use dropbox or something like it:
- Other people use email. Emailing to themselves or to collaborators when they finished something.
And that is fine. If it works, it works. However in some cases you might want to go back to a previous version and work from there, or start with a variant your colleague made. That could become very difficult with these ways of versioning. Also you never know what changed in these versions untill you open the file and manually compare things. That gets tedious.
Version control software
With version control software you can create snapshots of the points where you fixed bugs, where you finished features and even better, you can tell exactly where versions of the file are different.
The most widely used software are Mercurial, SVN and GIT. We will work with GIT, first of all because it can be used with Rstudio, though svn works too, and second because it works nicely with Github.
So how does Git work? Every time you reach a point in you project that you think is critical, you make a commit. You save a current state of all the files in the directory. And when you make this snapshot of your files, you can (and should) write down what you solved and what you changed since last time. In the future when you look back at your commit history you can read in what state your project was.
In the next example you can see what changed in the files, without even looking at the files themselves.
Branching
Even better, you can start from any saved point in time and create a new version. And when you like that version better, merge it back into an other version. In the example above, at the second commit I branched (purple line). the third row from below is a commit in the purple branch. Then I changed something in the normal branch and finally I merged the blue and purple line in the second line from the top.
You don’t have to use branching, just saving important points along the way is a great start (It would be the point where you email yourself a version, or save a new version of the file).
Starting with Git
Git was developed by people at Linux because their other version control software was hard to work with [^1]. Git is designed to work with a distributed nonlinear workflow… Which means that everyone can work at any time at their version of software and you can merge those versions together. What you need to know is that it works, it’s free, works on all systems, and that many people use it. You can use it for your projects, even if you work alone. It helps keeping your files under control and makes it easy to go back to previous versions of your files. It is not a backup solution (please make backups!) and it is not a unicorn [^2]. But how do you work with git?
graphical user interfaces (gui) for git
Git lives in the command line, you need to navigate to the right folder on your computer within the command line, and type the right commands. Unfortunately I always forget what the commands are. But for people like me there is a GUI for windows that takes care of many things. But I would actually recommend Sourcetree for windows (mac also). It’s a graphical user interface where you keep track of all your repositories. It’s a great tool, see this youtube video for a short [14 mins] tutorial into sourcetree.
Do I need to install all this new sofware? I’m just coding for fun!
No, you don’t have to. All I would recommend is to download Git and install it. Rstudio has gitsupport build in, you only need to install git on your system and tell rstudio where to find it. After that you can click icons.
Rstudio and Git
According to Rstudio, you will have to activate git support after you have downloaded and installed it to your computer.
- Go to Global Options (from the Tools menu)
- Click Git/SVN
- Click ‘Enable version control interface for RStudio projects’
- If necessary, enter the path for your Git or SVN executable where provided.
So, how do you use version control within Rstudio?
Rstudio project and git.
Start a new project
I chose an empty project in a new directory
and then click ‘Create a git repository’
The repo and real folder on windows 8.1 look like this.
When you start a new project a Rproject file is placed in the folder that contains all the project settings you have. But when you enable git, a .gitignore file is also placed in your folder. That file tells git which files not to track for changes. Rproject makes sure that the the temporary r files are not tracked, because temporary files will be recreated every time and tracking them is useless. In my case I have turned on the ‘show hidden files’ option in windows. If you don’t have that on (and you don’t have to) you will only see the gitignore file (with no name) and the rstudioproject file.
Now let’s look back at rstudio git tab.
Git version control within Rstudio: your first commit
I have added the second file, the icon changes to a green A (short for: add to repository), the first one shows two yellow questionmarks (short for: not tracked, not changed, I think).
- add the two files of your project and click ‘commit’
A new window will open:
The left part of the screen shows what files are in the commit, the bottom part displays the changes since last commit. Green means added, red means subtracted.
- Click on the second file in your commit, the bottom part displays what has changed.
 The message does not have to be long, short is better. in this case I used: “init commit” That just tells me it was the first commit before I did anything.
- Click ‘commit’ when you typed your description.
a window will open with a description of what happened.
When you return to the main view of rstudio you will see that the git tab has changed a bit, there are no files (because nothing has changed yet since your commit 2 seconds ago) and next to the gear wheel it says: ‘master’ . This is the branch you are on right now. By default the first branch is master.
Let’s create a new file
Git version control within Rstudio: your first new file.
- Create a new file and fill it with some code or:
# This is a awesome function
# It takes a number and gives you
# the corresponding letter in the
# alphabet.
# 2016-02-27
# YOUR name
- Then save it in scripts/ (yes, you must create that folder as well, or don’t I’m not the police…)
- add it to the repo (clicking it will tell git to track that file from now on)
It will look like this
Let’s look at the history of your commits, click on the clock in the git tab. Mine looks like this:
Note the commit message, it says what the commit adds to the repo. Try to write your messages as if you fulfull a order and discribe the contents. For example: “adds count_messages function that counts messages send to the user” or, “fix issue #2 can’t work with arrays”.
That way you can scan through your commits and see what changed where. When you click on a commit you can see what changed since the commit before.
some questions
- Will version control eat up all my hard disk space?
No, first of all all r scripts are essentially plain text files and take up little space and second, git only saves what changed since the last time. So the total file size should not go up that much. And third, space is cheap, you will not easily run out of space on modern computers.
- Nice! Can I add my data files to a git repo as well?
It is not recommended to add datafiles to a repo. I think it can work with plain text files such as .txt, .csv, .tdv . But many other files can’t be read by git, so it treats them as binary files. Git can only see that the file has changed, but doesn’t know WHAT changed. So it saves the new version as a whole. If you have some large binary files that change often, they will eat up a lot of space. There is a git large file system but I don’t know how it works yet. Do add example csv files or smaller files if you’d like to.
Further Reading
- Git in Rstudio
- git website
- r-blogger.com all articles about git
- Atlassian company of Sourcetree, has a long read about branching models
- r-bio example of git and rstudio
The best resource is https://stat545-ubc.github.io/
References
- [^1]: Linus Torvald (the main man behind linux) actually said he wouldn’t touch subversion with a ten-foot pole. https://git.wiki.kernel.org/index.php/LinusTalk200705Transcript
- [^2]: Chasing unicorns, the pursuit of something that’s, for all intents and purposes, unobtainable as unicorns don’t exist. Meaning it doesn’t magically solve all the problems other version control software has.


5 For there is a day of tumult, treading down, and confusion for the Lord, Yahweh of hosts,
in the valley of vision, a breaking down of the walls, and people crying out to the mountains.
6 Elam takes up the quiver, with chariots of men and horsemen,
and Kir lays the shield bare.
7 It will come about that your choicest valleys
will be full of chariots, and the horsemen will take their positions at the gate.
8 He took away the protection of Judah;
and you looked in that day to the weapons in the Palace of the Forest.
9 You saw the breaches of the city of David, that they were many,
and you collected the water of the lower pool.
10 You counted the houses of Jerusalem, and you tore down the houses to strengthen the wall.
11 You made a reservoir between the two walls for the water of the old pool.
But you did not consider the city's maker, who had planned it long ago.
12 The Lord, Yahweh of hosts called on that day
for weeping, for mourning, for shaved heads, and the wearing of sackcloth.
13 But look, instead, celebration and gladness, killing cattle and slaughtering sheep,
eating meat and drinking wine; let us eat and drink, for tomorrow we will die.
14 This was revealed in my ears by Yahweh of hosts:
"Surely this iniquity will not be forgiven you, even when you die," says the Lord, Yahweh of hosts.
15 The Lord, Yahweh of hosts, says this, "Go to this administrator, to Shebna, who is over the house, and say,
16 'What do you have here, and who are you, that you have hewn out a grave?

He will be a father to the inhabitants of Jerusalem and to the house of Judah.
22 I will place the key of the house of David on his shoulder;
he will open, and none will shut; he will shut, and none will open.
23 I will fasten him like a nail in a secure place,
and he will become a throne of glory to his father's house.
24 They will hang upon him all the glory of his father's house, the offspring and descendants, every small vessel
from the cups to all the jugs.
25 On that day—this is the declaration of Yahweh of hosts—the peg driven in a firm place will give way, break off, and fall, and the weight that was on it will be cut off—for Yahweh has spoken.


Priest Zigaunt:
You must bring a signed covenant from Lionel. Please hurry, the church wants to take care of this very quickly.


Arlington Road A film review by Steve Rhodes Copyright 1999 Steve Rhodes RATING (0 TO ****): **
You're a single father, and your 9-year-old son wants to go to a camp in the woods with a group called the Discoverer Troops. The problem is that the group may be something akin to the Hitler Youth. The group is associated with your neighbor, whom you have good reason to suspect is an anti-government terrorist and who is in town to bomb a large building full of innocent victims. His son will accompany yours on the trip.
When your son begs to go, do you give in and let him go?
 After all, you're not absolutely positive that your neighbor is a mass murderer about to strike again.
This is one of many such predicaments that confront poor Michael Faraday (Jeff Bridges). And its implausible resolution is one of many that the audience has to swallow. Better buy a large soda for this movie since you're going to be asked to swallow a lot.
Oh, did I mention that Michael is not some na´ve citizen but is an expert on terrorist activities? He even teaches a course about them at George Washington University.
Actually, the movie's most serious flaws are the twists and surprise coincidences that don't seem too ridiculous until you think about them after the movie. It is only then that you realize that in order for them to work, a series of almost random events have to happen in just the right time and sequence, like a gambler who bets he can draw to a dozen inside straights in a row.
It is a shame that writer Ehren Kruger felt compelled to make the plot so obvious. Whenever he introduces any ambiguity, he feels obligated to resolve it in the next scene. As an outline, the movie works. But the devil is in the details. And the devil in these details is way too easy to spot.
Although the script is full of holes and Mark Pellington's direction is too often lethargic, some superlative acting almost saves the picture.
With suave and seductive charm, Tim Robbins plays the is-he-evil-incarnate-or-isn't-he neighbor, Oliver Lang. Oliver appears to be a reserved and compassionate man, who is as pure as the driven snow. With sweetness and delicacy, Robbins steals scene after scene. With a less obvious script and a subtler director, Robbins's brilliant work could have made this picture shine.
Jeff Bridges gives a convincing and sincere performance as the haggard father caught in the whirlwind. His proclivity to punctuate sentences with needless pauses can be frustrating, but, in his defense, perhaps it makes it more natural as well.
On the other hand, Hope Davis, as Michael's girlfriend, Brooke Wolfe, is almost too smart for the part. She plays a character who laughs off plausible warnings for too long.
As Oliver's wife, Cheryl, Joan Cusack was cast, one would suppose, to give the deadly serious thriller a comedic touch. Nothing she does is funny, leaving her seeming like a fish out of water. She manages to maintain the same fake, frozen smile throughout the entire movie.
The movie opens with Oliver's son standing in the street with blood dripping from what appears to be a hand partially blown away. He claims that he was just playing with fireworks -- in the middle of March, no less. Why don't writers give audiences credit for more intelligence? Why do they feel they have to telegraph every punch?
The movie does end with a dramatic and almost satisfying twist. But before you get too impressed, think about it for a minute. The ending manages to destroy not only the last part of the picture, it also makes suspect many of the seemingly more rational parts of the rest of the movie.
Check your brains at the door. Keep your eyes on Tim Robbins. And maybe you'll be able to overlook the film's flaws. Robbins gives the picture more than it deserves. His performance almost makes the movie worth recommending.
ARLINGTON ROAD runs 1:57. It is rated R for violence and some profanity and would be acceptable for teenagers.
Email<EMAIL_ADDRESS>Web: http://www.InternetReviews.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Sequence. Prints a sequence of numbers from # to #
seq 0 5
0
1
2
3
4
5
Use in ping sweep for example
#!/bin/bash
for ip in $(seq 231 250)
ping -c 1 10.219.54.$ip


Next, we'll ask your to take a selfie to compare to your ID.
Start by looking directly at the camera.


Provides a collection of functions
to manage, to investigate and to analyze data sets of financial
assets from different points of view.
| Version: |
3042.84 |
| Depends: |
R (≥ 2.15.1), timeDate, timeSeries, fBasics |
| Imports: |
fMultivar, robustbase, MASS, sn, ecodist, mvnormtest, energy, grDevices, graphics, stats |
| Suggests: |
methods, mnormt, RUnit |
| Published: |
2017-11-16 |
| Author: |
Diethelm Wuertz [aut],
Tobias Setz [cre],
Yohan Chalabi [ctb] |
| Maintainer: |
Tobias Setz <tobias.setz at live.com> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: |
https://www.rmetrics.org |
| NeedsCompilation: |
no |
| Materials: |
ChangeLog |
| In views: |
Finance |
| CRAN checks: |
fAssets results |


U.S. set to delay new auto tariffs by up to six months, industry sources say
WASHINGTON – The Trump administration plans to delay a decision about additional tariffs on imported cars, according to two industry sources.
The delay could last up to six months, the sources said, with the announcement expected as soon as Wednesday.
U.S. President Donald Trump “doesn’t have to make this decision tomorrow,” one of the sources said.
The Trump administration has been threatening since last year to impose tariffs of perhaps 25 percent on auto imports to defend the U.S. auto sector, a symbol of American manufacturing.
Trump already postponed the tariff decision — the threat of which has caused uncertainty in the European car industry, especially in Germany — for 180 days in May.
In September, the administration reached an agreement with Japan to keep tariffs on hold while talks continued.
Washington and Seoul reached an agreement last year in which South Korea promised to further open its market to U.S. automakers.
U.S. Commerce Secretary Wilbur Ross, the official who had raised national security concerns as a reason for imposing new tariffs in the first place, said after “very good conversations” with automakers in the EU, Japan and elsewhere this month that additional import fees might not be necessary.
“Our hope is that the negotiations we’ve been having with individual companies about their capital investment plans will bear enough fruit that it may not be necessary” to launch a so-called Section 232 investigation, Ross told Bloomberg Television.
The industry sources also indicated Tuesday that the administration desires concessions — investments — as part of possible agreements. But companies such as Germany’s BMW could be hesitant to make such concessions, as the automaker is already expanding in the U.S. and so would be less affected by new tariffs anyway.
Outgoing European Commission President Jean-Claude Junker said in an interview with German media last week that he believed the U.S. would not impose new tariffs on European cars in the coming days.
Neither the White House nor other officials from the Trump administration responded to requests for more information.
GET THE BEST OF THE JAPAN TIMES
IN FIVE EASY PIECES WITH TAKE 5
JOIN THE CONVERSATION