S206E Lecture 13, 5/22/2016, Grasshopper Math and Logic Rules

Similar documents
S206E Lecture 23, 5/26/2016, Interaction between Python and Grasshopper

S206E Lecture 16, 4/27/2018, Rhino 3D, Grasshopper & Architecture Modeling

S206E Lecture 17, 5/1/2018, Rhino & Grasshopper, Tower modeling

S206E Lecture 15, 4/27/2018, Rhino 3D, Grasshopper, Shanghai Tower modeling

GRASSHOPPER TUTORIAL 02 PERFORATED CURVATURE.

S206E Lecture 22, 5/26/2016, Python and Rhino interface

Direction Fields; Euler s Method

Lecture 4, 5/27/2017, Rhino Interface an overview

S206E Lecture 5, 5/18/2016, Importing and Tracing Drawing Information

Graphs of Equations. MATH 160, Precalculus. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Graphs of Equations

Use Geometry Expressions to create and graph functions, and constrain points to functions.

Envelope Parametric Model using Grasshopper

Summary of Formulas: see

Math 8 Honors Coordinate Geometry part 3 Unit Updated July 29, 2016

Conic Sections: Parabolas

GRAPH MATHEMATICS (SAMACHEERKALVI) HARDWORK IS THE BEST WEAPON TO DEFEAT FAILURE. SELF CONFIDENCE +HARDWORK = SUCCESS X- STANDARD

Dgp _ lecture 2. Curves

Let be a function. We say, is a plane curve given by the. Let a curve be given by function where is differentiable with continuous.

Rhino Grasshopper Tutorial. Ivo A. Semerdjiev digiitalarchfab.com/portal

TI- Nspire Testing Instructions

Z+z 1 X2 Y2. or y, Graph / 4 25 jj y=±x. x2+y 2=

12.4 Rotations. Learning Objectives. Review Queue. Defining Rotations Rotations

Output Primitives. Dr. S.M. Malaek. Assistant: M. Younesi

Set 5, Total points: 100 Issued: week of

CPSC / Scan Conversion

Rectangular Coordinates in Space

Objectives. Materials

SWITCHING FROM GRASSHOPPER TO VECTORWORKS

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

Name: Date: 1. Match the equation with its graph. Page 1

ME 111: Engineering Drawing. Geometric Constructions

Section 2.3 (e-book 4.1 & 4.2) Rational Functions

Lesson 3: Investigating the Parts of a Parabola

Properties of Quadratic functions

x 6 + λ 2 x 6 = for the curve y = 1 2 x3 gives f(1, 1 2 ) = λ actually has another solution besides λ = 1 2 = However, the equation λ

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005

Math 2 Coordinate Geometry Part 3 Inequalities & Quadratics

CS 130. Scan Conversion. Raster Graphics

B. Examples Set up the integral(s) needed to find the area of the region bounded by

13.2 LIMITS AND CONTINUITY

2D and 3D Transformations AUI Course Denbigh Starkey

INTRODUCTION // MODELING PROCESS COMPARISON

= secant lines of the n+1 unit circle divisions (d)

Chapter 3: The Parabola

Bezier Curves. An Introduction. Detlef Reimers

Solved Examples. Parabola with vertex as origin and symmetrical about x-axis. We will find the area above the x-axis and double the area.

3.1 Investigating Quadratic Functions in Vertex Form

Math 165 Guided Activity to study ahead some concepts from sections 1.1 and 1.2 Name Section Distance and Midpoint Formula

CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH Warm-Up: See Solved Homework questions. 2.2 Cartesian coordinate system

Collisions/Reflection

Pure Math 30: Explained!

1 MATH 253 LECTURE NOTES for FRIDAY SEPT. 23,1988: edited March 26, 2013.

Geometry: Angle Relationships

Floor Plan Optimization through Evolutionary Simulation

Exam 2 Preparation Math 2080 (Spring 2011) Exam 2: Thursday, May 12.

GRAPHING WORKSHOP. A graph of an equation is an illustration of a set of points whose coordinates satisfy the equation.

Grade 6 Math Circles Fall 2010 Tessellations I

Lectures on Challenging Mathematics. Integrated Mathematics 3. Idea Math. Algebra (part 2) Summer Internal Use

2. The LabView Environment Two panes will open, one is the Front panel, and one is the Block Diagram

Lecture 5. If, as shown in figure, we form a right triangle With P1 and P2 as vertices, then length of the horizontal

VOLUME OF A REGION CALCULATOR EBOOK

Green Globs And Graphing Equations

CCNY Math Review Chapter 2: Functions

Year 7 Term 1 Intermediate

Loop Invariant Examples

Name. Center axis. Introduction to Conic Sections

Lecture 19: Functions, Types and Data Structures in Haskell

7. r = r = r = r = r = 2 5

4 = 1 which is an ellipse of major axis 2 and minor axis 2. Try the plane z = y2

True/False. MATH 1C: SAMPLE EXAM 1 c Jeffrey A. Anderson ANSWER KEY

3.7. Vertex and tangent

Section 4.4: Parabolas

More Formulas: circles Elementary Education 12

Matlab Tutorial: Basics

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

RHINO SURFACE MAKING PART 1

RHINOCEROS AND NURBS MODELING

Digitizer Leapfrogging

Lesson 6: Manipulating Equations

Unit: Quadratic Functions

Chapter 2: Rhino Objects

Geometry and Curve Definition

S206E Lecture 3, 5/15/2017, Rhino 2D drawing an overview

Slope of the Tangent Line. Estimating with a Secant Line

Essential Mathematics for Computational Design

Accelerated Pre-Calculus Unit 1 Task 1: Our Only Focus: Circles & Parabolas Review

Level8opaedia. A level is a level. Compiled for

MAT 003 Brian Killough s Instructor Notes Saint Leo University

Section 1.1 Patterns in Division

Table of Contents. Introduction to the Math Practice Series...1

10.7. Polar Coordinates. Introduction. What you should learn. Why you should learn it. Example 1. Plotting Points on the Polar Coordinate System

Learning Task: Exploring Reflections and Rotations

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

Exploring Quadratic Graphs

Objective. m y 1 y = x 1 x 2

Workshop: Dynamic Inspirations with Nspire Dr. René Hugelshofer, Heerbrugg, Switzerland.

a) Draw a line through points A and B. What is one symbol or name for it?

Describe Plane Shapes

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling

Transcription:

S206E057 -- Lecture 13, 5/22/2016, Grasshopper Math and Logic Rules Copyright 2016, Chiu-Shui Chan. All Rights Reserved. Interface of Math and Logic Functions 1. Basic mathematic operations: For example, choose the mathematic operators of +, -, *, / from the Maths tag > Operators panel, define inputs of A and B variables through number sliders, calculations of these operations will be displayed in a panel. A + B A - B A * B A / B Reminder of A/B A B Other operators could also be found under Maths > Util panel, for instance, the Natural logarithm or Pi, or even type in the expression or the name of the Pi or e (natural logarithm) in the panel area. See examples below. Page 1 (5/1/2016)

Arch534 Spring 2015 Similarity threshold between A & B is within 10%. A = B, true or false? A > B or A B, true or false? A< B or A B, true or false? 2. Mathematic equation input executing a formula GH provides some math equations to let users set up their own math equations for geometric calculation and form generation. For example, it is easy to use an equation to draw a shape in Rhino. This example given in this tutorial handout is based on the Lynda.com Grasshopper tutorial. 1. Choose Maths tag > Script panel > Evaluate, or double click the Canvas, type eval to activate the Evaluation component; 2. Zoom in to be able to remove the Y index parameter away from the component. 3. F is an expression, and x & Y are two variables. Remove Y variable 4. We will use a simple formula Y = X 2 to draw a parabolic curve. In this Eval component, F is the formula, X is the input and the result of the calculation will pass over to r as the calculation results. 5. There are three ways of setting up the formula, method A is to right click F, type in X*X to the Expression Editor > click Commit Changes. The Eval component will do the calculation and pass the results in real number format to r for output. Page 2 (5/1/2016)

6. Method B is to click Expression Editor to define a complicate formula in the window. Formula could be typed in here and click Commit changes to complete the input. 7. Method C is to provide a visual clue by choosing Params tag > Input > Panel to display the formula and provide the expression on the sub-window and provide output to F in Eval. So, create two panels and type in the formula on one Panel and link it to the F input. 8. For constructing a parabolic, the X input must be a series of numbers. We could use Range component for doing it. Range divides a domain into a number of equal sections. It takes two inputs. The first one is Domain, which gives us the high and the low value between which to operate. The second is a Number of steps, which is a number of divisions to make over the domain. In this example, we have 10 steps, so the function will generate 10 numbers (steps) evenly spaced between 0 and 10. We could also figure out the space between those numbers, which is also called the step size, by dividing the length of the domain by the number of steps. In this example, 10 over 10 equals 1. So, it shows in the panel that the values are spaced one unit apart from each other. Page 3 (5/1/2016)

Arch534 Spring 2015 9. The domain could be well-defined by Construct Domain. Delete the old Domain input and replace it with Construct Domain, which will set up a low and high domain, link the Construct Domain output to the D input in Range. Set up two sliders of -20<-5<0, wire it to A, and 0<5<20 slider for B in Construct Domain component. Now, wire the Range output to Eval X input. 10. Now show the results in Rhino points. Choose Vector Tag < Point < Construct Point. While applying the Y=X 2 to generate the parabola, the X values are the list of numbers coming straight out of the range component. So link the R in Range to X in Pt component. Then, in Rhino, evenly spaced points are shown on the X axis. The Y values are from the Eval calculated output list. Thus, link the r from Eval to Y in Pt. Then a parabolic shape is generated in Rhino. 11. Finally draw the curve Go to the Curve Tag > Spline > Nurbs Curve Page 4 (5/1/2016)

The point output of the Construct Point component will serve as the Vertices component of the Nurbs Curve. So, after the link, the parabola is created in Rhino. 2. Logic expression: Logic expression relates to the if-then-else, conditional cases, etc which also be done by Eval component. Here is an example. Exercise: For example, if X>Y, then return True value. Here are the steps: 1. Use the component of Panel to set up the formula X>Y. 2. Apply two sliders to provide user input. 3. Use Evaluation component. The panel output is the expression input in Eval, X and Y are inputs. Return of the evaluation values, true or false, to another panel for review. Here are the results. If X>30, then draw a circle, otherwise draw a polygon in Rhino. The radius of these shapes would depend upon the amount of input value. Here is the algorithm applied in GH. 1. In this example, a dispatch component is used to decide whether it is true or false. The dispatch will sort a list based on true false pattern output from a conditional statement. Page 5 (5/1/2016)

Arch534 Spring 2015 2. Dispatch will receive an input from Eval as the dispatch pattern. If it is true then do A, otherwise do B. A is to draw a circle, whereas B is to draw a polygon. I also put a panel on both A and B output to get a better idea on (or to visualize) what the output values are. What happens if x equals to 30, and how to implement the coding? The Dispatch function has more ability to sort out the input data into two parts. See the following example: Input: List = [A, B, C, D} Dispatch pattern = [True, False] Resulting output: List A = [A, C] List B = [B, D] Page 6 (5/1/2016)

Example 3: How to separate a list of numbers from -10 to +25 into three different lists? 1. X < -5 2. -5 < X < 15 3. X > 15 Method A: Apply Series to create a series of numbers, use three evaluations and three dispatch to provide three lists. Method B: Same ideas but applying different Boolean operations. More will be explained in later lectures and exercises. Yet, the most important point is the design thinking and intension that could be implemented digitally and executed in Grasshopper. Page 7 (5/1/2016)