A presentation about Scripting in Rhino 3D Software. It was designed, developed and delivered in King Abdullah University of Science and Technology on April, 2011
This document provides an introduction to JavaScript presented by Thinkful. It discusses JavaScript basics like variables, data types, functions and strings. It also covers how JavaScript fits into modern web development. The presentation encourages participants to practice coding concepts in their browser console and provides several coding drills and exercises to work through.
We have done a lot of cool things at Grasshopper, made a huge pricing mistake with Chargify, and shut down Spreadable (a website growing and making money) - here is what we learned from all those experiences!
This document provides a tutorial on how to use Rhino, a 3D modeling software. It discusses Rhino's interface and basic tools such as points, lines, curves, surfaces, solids, and object manipulation tools. It provides step-by-step instructions for how to use modeling tools like extrude, revolve, loft, sweep, blend and boolean operations. It also covers surface editing tools, mesh tools, and how to accurately set up grids and units for modeling. The overall document serves as an introduction to the main capabilities and functions within Rhino.
The document discusses the seven main principles of Islamic architecture: Tawheed, Ihtiram, Ikhlas, Iqtisad, Haya', Ilm, and Dhikr. It provides examples of how these principles are incorporated into architectural features of mosques such as minarets, domes, courtyards, and use of natural elements and calligraphy to inspire worship and guide Muslims. The principles all work together in Islamic architecture to create structures that are balanced and complement one another.
This document provides an overview of Islamic architecture. It begins by defining architecture and its relationship to culture, then defines Islam. It explores key characteristics of Islamic architecture including its monotheistic foundations, the symbolic and spiritual importance of the Kaaba, orientation of mosques towards Mecca, common mosque features like minarets and domes, and the emphasis on courtyards in homes and cities. Examples of historic and modern Islamic architecture are presented, along with ornamentation styles. The goal is to understand the main concepts and philosophies that unite different Islamic architectural styles.
This document provides an overview of Islamic architecture in India from the 11th century onwards. It discusses the key architectural elements introduced during this period such as the use of arches, domes, and geometric patterns instead of traditional Hindu styles. Some of the most important early Islamic structures mentioned are the Quwwat-ul-Islam Mosque built in 1192, the Qutub Minar started in 1192, and various buildings constructed during the Delhi Sultanate period from the 13th to early 16th centuries, including tombs, mosques, and fortifications. It also describes the evolution of architectural styles and increasing incorporation of Hindu elements over this time frame.
It is the research summary presentation for the partial fulfillment of the subject Directed Studies and Seminar conducted in final year of Department of Architecture Central Campus Pulchowk.
This document provides an introduction to JavaScript presented by Thinkful. It discusses JavaScript basics like variables, data types, functions and strings. It also covers how JavaScript fits into modern web development. The presentation encourages participants to practice coding concepts in their browser console and provides several coding drills and exercises to work through.
We have done a lot of cool things at Grasshopper, made a huge pricing mistake with Chargify, and shut down Spreadable (a website growing and making money) - here is what we learned from all those experiences!
This document provides a tutorial on how to use Rhino, a 3D modeling software. It discusses Rhino's interface and basic tools such as points, lines, curves, surfaces, solids, and object manipulation tools. It provides step-by-step instructions for how to use modeling tools like extrude, revolve, loft, sweep, blend and boolean operations. It also covers surface editing tools, mesh tools, and how to accurately set up grids and units for modeling. The overall document serves as an introduction to the main capabilities and functions within Rhino.
The document discusses the seven main principles of Islamic architecture: Tawheed, Ihtiram, Ikhlas, Iqtisad, Haya', Ilm, and Dhikr. It provides examples of how these principles are incorporated into architectural features of mosques such as minarets, domes, courtyards, and use of natural elements and calligraphy to inspire worship and guide Muslims. The principles all work together in Islamic architecture to create structures that are balanced and complement one another.
This document provides an overview of Islamic architecture. It begins by defining architecture and its relationship to culture, then defines Islam. It explores key characteristics of Islamic architecture including its monotheistic foundations, the symbolic and spiritual importance of the Kaaba, orientation of mosques towards Mecca, common mosque features like minarets and domes, and the emphasis on courtyards in homes and cities. Examples of historic and modern Islamic architecture are presented, along with ornamentation styles. The goal is to understand the main concepts and philosophies that unite different Islamic architectural styles.
This document provides an overview of Islamic architecture in India from the 11th century onwards. It discusses the key architectural elements introduced during this period such as the use of arches, domes, and geometric patterns instead of traditional Hindu styles. Some of the most important early Islamic structures mentioned are the Quwwat-ul-Islam Mosque built in 1192, the Qutub Minar started in 1192, and various buildings constructed during the Delhi Sultanate period from the 13th to early 16th centuries, including tombs, mosques, and fortifications. It also describes the evolution of architectural styles and increasing incorporation of Hindu elements over this time frame.
It is the research summary presentation for the partial fulfillment of the subject Directed Studies and Seminar conducted in final year of Department of Architecture Central Campus Pulchowk.
How Android utilizes its Linux core in the heart of its security architecture
Presented at August-Penguin 2015, Israel Open-Source organization conference
http://ap.hamakor.org.il/2015
Running your Spring Apps in the Cloud Javaone 2014cornelia davis
Walk through what it took to bring a Srping App initially built for 2nd platform (infrastructure dependent) deployment, and make it deployable to 3rd platform (Cloud Foundry).
Multimedia document processing using the Weblab platform: AXES project use ca...OW2
AXES (http://axes-project.eu) was a project co-funded by the European Union’s Seventh Programme for Research, Technological Development and Demonstration. The goal of AXES was to develop tools that provide various types of users with new engaging ways to interact with audiovisual libraries, helping them to discover, browse, search and enrich video archives.
The OW2 WebLab (http://weblab-project.org) integration platform for multimedia processing has been used to aggregate the services developed by 9 partners in order to build the three demonstrators targeting various user groups: the media professionals, the journalists and researchers as well as the home users.
As a result of the AXES project, OW2 "Open AXES", is born. It provides a complete solution that gathers innovative audiovisual content analysis technologies (shot and keyframes detection, image classification, speech transcription, large scale indexing, similarity search, etc.) as well as an ergonomic interface to retrieve and navigate in video archives.
Bridging the gap between business and technology - Behaviour Driven Developme...Eugenio Minardi
This document discusses Behavior Driven Development (BDD) with Drupal. BDD is an agile methodology that promotes communication and collaboration through writing scenarios that describe application behaviors. The scenarios are used to automate testing and provide documentation. BDD helps bridge communication gaps between business and technical teams. When using BDD with Drupal, tools like Behat and Mink allow writing tests in the Gherkin language that can test Drupal functionality and behaviors.
The document discusses the future direction of the ColdFusion product. It outlines plans to modernize the language with improved object oriented support, CFScript 2.0, support for null values, and multi-threading. It also discusses leveraging containerization with Docker, provisioning a microservices architecture, embracing devsecops practices like a built-in web application firewall, and accelerating digital transformation with enhanced API management capabilities. The goal is to implement a modern platform for building and deploying applications.
This document discusses best practices for iOS development, covering topics like design principles in Swift, recommended libraries, testing, continuous integration, localization, and best practices. It provides examples of applying SOLID design principles like the single responsibility principle, Liskov substitution principle, and dependency inversion principle in Swift code. It also discusses design patterns like facade and singleton patterns. Recommended libraries for tasks like UI customization, camera/photo, analytics, and networking are listed. The importance of writing unit tests and integrating testing into continuous integration/delivery pipelines is emphasized.
React, Angular, TypeScript… Over the past few years, all these names took part in a fashionable phenomenon, pushed by the big names of the web industry. But what if a parallel world exists beyond this marketed mirror? A better world where you can easily build flexible applications with reusable components. Bourre will explain the right philosophy for building flexible applications with reusable components. As well, he will showcase the few tools to better achieve these goals, pushing forward the limits of the JS eco-system.
This document summarizes a talk about using Domain-Driven Design patterns and principles when developing applications with the Symfony framework. It discusses where to store business logic in an MVC application, avoiding anemic domain models by putting logic in entities. It provides examples of domain models, repositories, value objects, and strategies when building a Symfony application with DDD in mind. Finally, it outlines common DDD patterns and principles and recommends resources for further reading on the topic.
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...mfrancis
OSGi Community Event 2014
Abstract:
Let's say you need to provide an internet service to your users. Chances are that your service should be available via REST. Let's say your service should both provide data to users as well as accept data posted by users, and possibly some logic. Now let's assume your service turns out to become incredibly popular, with lots and lots of users. Sounds like you need Sling and OSGi in the cloud.
In this talk Carsten and David will go through the OSGi and Sling architecture to achieve this. The talk outlines how the OSGi Cloud Ecosystems RFC is used in combination with Apache jclouds to achieve vendor independence. It also discusses how automatic scaling depending on measured load is achieved to ensure responsiveness. The resulting system is a dynamic cloud application handling any REST API, which can scale up and down depending on the need.
Speaker Bios:
David Bosschaert
David Bosschaert works for Adobe Research and Development. He spends the much of his time on technology relating to OSGi in Apache and other open source projects. He is also co-chair of the OSGi Enterprise Expert Group and an active participant in the OSGi Cloud efforts.
Before joining Adobe, David worked for Red Hat/JBoss and IONA Technologies in Dublin, Ireland.
Carsten Ziegeler
Carsten Ziegeler is senior developer at Adobe Research Switzerland and spends most of his time on architectural and infrastructure topics. Working for over 25 years in open source projects, Carsten is a member of the Apache Software Foundation and heavily participates in several Apache communities including Sling, Felix and ACE. He is a frequent speaker on technology and open source conferences and participates in the OSGi Core Platform and Enterprise expert groups.
The document discusses ColdFusion Splendor, an upcoming release of ColdFusion. It focuses on enhancing ColdFusion for mobile application development, including building, testing, and debugging mobile apps. It also covers improvements to PDF generation and manipulation, additional language enhancements like script support and JSON serialization, strengthened REST services and websockets, and increased security features.
This document provides best practices for developing SDKs. It discusses defining the SDK's purpose and services, planning the public API with an easy to use builder pattern and exceptions, planning the internal architecture with minimal dependencies and permissions, writing code with unique prefixes and lifecycle considerations, including sample apps and documentation, packaging as an AAR file, and tools for testing like Battery Historian and Stetho.
A presentation on how to debug your Drupal code. Drupal is a very powerful system and the same time it is also a very complex system. Only somebody really good at Drupal and PHP would be able to master debugging Drupal. Here is a presentation on how to equip yourself to debugging Drupal.
This document summarizes Behavior Driven Development (BDD) and its use of user stories for end-to-end testing in .NET. It discusses frameworks like SpecFlow and StoryQ that use a Given/When/Then syntax inspired by Cucumber. The document demonstrates SpecFlow using a pet rescue site, changing designs and using setups/teardowns to test features via the NUnit runner as part of continuous integration. It also mentions tools for editing Gherkin files with auto-complete and syntax highlighting.
LDOW2015 - Uduvudu: a Graph-Aware and Adaptive UI Engine for Linked DataeXascale Infolab
Uduvudu exploits the semantic and structured nature of Linked Data to generate the best possible representation for a human based on a catalog of available Matchers and Templates. Matchers and Templates are designed that they can be build through an intuitive editor interface.
Zend_Tool: Rapid Application Development with Zend FrameworkRalph Schindler
This document summarizes Ralph Schindler's presentation on Zend_Tool, a proposed set of tools for rapid application development in the Zend Framework. The presentation covers current tooling problems, proposals to address these problems including Zend_Tool_Rpc, Zend_Tool_Project and Zend_Tool_CodeGenerator. It demonstrates the prototype tool through examples and discusses advanced concepts like using the tool to generate domain models from database schemas. The presentation concludes with next steps and asking for community feedback.
Despite all of the recent interest, concurrency in standard C++ is still barely in its infancy. This talk uses the primitives supplied by C++14 to build a simple, reference, implementation of a task system. The goal is to learn to write software that doesn’t wait.
Doing Quality Assurance in PHP projects sometimes looks like a dark art! Picking the right tools, making all tools work together, analysing your code and even then deliver all the required features of the software project can be quite challenging.
This talks aims to help lowering the entry barrier for doing QA on your project, sharing the experience, knowledge and some tricks that brings QA back from the dark arts to the every day of a PHP programmer.
We will review tools like Jenkins, PHPUnit, phpcs, pdepend, phpcpd, etc and how we can chain them together to make sure we are building a great software.
Structuring An ABAP Report In An Optimal WayBlackvard
Spaghetti code? Do you want to get rid of it now? Are your ABAP reports not structured well enough? Join Blackvard's CEO Lukas Dietzsch in this complimentary webinar as he demonstrates how to structure SAP ABAP reports in an optimal way, using several new development tools now available in Eclipse.
Interactive Walkthrough in Virtual Cities and its Applications in Urban Design - Master's Thesis Defense Presentation - 2009 November 9 - Khaled Mohamed Ahmed Abd El Gawad - University of Alexandria - Institute of Graduate Studies and Research - Department of Information Technology
How Android utilizes its Linux core in the heart of its security architecture
Presented at August-Penguin 2015, Israel Open-Source organization conference
http://ap.hamakor.org.il/2015
Running your Spring Apps in the Cloud Javaone 2014cornelia davis
Walk through what it took to bring a Srping App initially built for 2nd platform (infrastructure dependent) deployment, and make it deployable to 3rd platform (Cloud Foundry).
Multimedia document processing using the Weblab platform: AXES project use ca...OW2
AXES (http://axes-project.eu) was a project co-funded by the European Union’s Seventh Programme for Research, Technological Development and Demonstration. The goal of AXES was to develop tools that provide various types of users with new engaging ways to interact with audiovisual libraries, helping them to discover, browse, search and enrich video archives.
The OW2 WebLab (http://weblab-project.org) integration platform for multimedia processing has been used to aggregate the services developed by 9 partners in order to build the three demonstrators targeting various user groups: the media professionals, the journalists and researchers as well as the home users.
As a result of the AXES project, OW2 "Open AXES", is born. It provides a complete solution that gathers innovative audiovisual content analysis technologies (shot and keyframes detection, image classification, speech transcription, large scale indexing, similarity search, etc.) as well as an ergonomic interface to retrieve and navigate in video archives.
Bridging the gap between business and technology - Behaviour Driven Developme...Eugenio Minardi
This document discusses Behavior Driven Development (BDD) with Drupal. BDD is an agile methodology that promotes communication and collaboration through writing scenarios that describe application behaviors. The scenarios are used to automate testing and provide documentation. BDD helps bridge communication gaps between business and technical teams. When using BDD with Drupal, tools like Behat and Mink allow writing tests in the Gherkin language that can test Drupal functionality and behaviors.
The document discusses the future direction of the ColdFusion product. It outlines plans to modernize the language with improved object oriented support, CFScript 2.0, support for null values, and multi-threading. It also discusses leveraging containerization with Docker, provisioning a microservices architecture, embracing devsecops practices like a built-in web application firewall, and accelerating digital transformation with enhanced API management capabilities. The goal is to implement a modern platform for building and deploying applications.
This document discusses best practices for iOS development, covering topics like design principles in Swift, recommended libraries, testing, continuous integration, localization, and best practices. It provides examples of applying SOLID design principles like the single responsibility principle, Liskov substitution principle, and dependency inversion principle in Swift code. It also discusses design patterns like facade and singleton patterns. Recommended libraries for tasks like UI customization, camera/photo, analytics, and networking are listed. The importance of writing unit tests and integrating testing into continuous integration/delivery pipelines is emphasized.
React, Angular, TypeScript… Over the past few years, all these names took part in a fashionable phenomenon, pushed by the big names of the web industry. But what if a parallel world exists beyond this marketed mirror? A better world where you can easily build flexible applications with reusable components. Bourre will explain the right philosophy for building flexible applications with reusable components. As well, he will showcase the few tools to better achieve these goals, pushing forward the limits of the JS eco-system.
This document summarizes a talk about using Domain-Driven Design patterns and principles when developing applications with the Symfony framework. It discusses where to store business logic in an MVC application, avoiding anemic domain models by putting logic in entities. It provides examples of domain models, repositories, value objects, and strategies when building a Symfony application with DDD in mind. Finally, it outlines common DDD patterns and principles and recommends resources for further reading on the topic.
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...mfrancis
OSGi Community Event 2014
Abstract:
Let's say you need to provide an internet service to your users. Chances are that your service should be available via REST. Let's say your service should both provide data to users as well as accept data posted by users, and possibly some logic. Now let's assume your service turns out to become incredibly popular, with lots and lots of users. Sounds like you need Sling and OSGi in the cloud.
In this talk Carsten and David will go through the OSGi and Sling architecture to achieve this. The talk outlines how the OSGi Cloud Ecosystems RFC is used in combination with Apache jclouds to achieve vendor independence. It also discusses how automatic scaling depending on measured load is achieved to ensure responsiveness. The resulting system is a dynamic cloud application handling any REST API, which can scale up and down depending on the need.
Speaker Bios:
David Bosschaert
David Bosschaert works for Adobe Research and Development. He spends the much of his time on technology relating to OSGi in Apache and other open source projects. He is also co-chair of the OSGi Enterprise Expert Group and an active participant in the OSGi Cloud efforts.
Before joining Adobe, David worked for Red Hat/JBoss and IONA Technologies in Dublin, Ireland.
Carsten Ziegeler
Carsten Ziegeler is senior developer at Adobe Research Switzerland and spends most of his time on architectural and infrastructure topics. Working for over 25 years in open source projects, Carsten is a member of the Apache Software Foundation and heavily participates in several Apache communities including Sling, Felix and ACE. He is a frequent speaker on technology and open source conferences and participates in the OSGi Core Platform and Enterprise expert groups.
The document discusses ColdFusion Splendor, an upcoming release of ColdFusion. It focuses on enhancing ColdFusion for mobile application development, including building, testing, and debugging mobile apps. It also covers improvements to PDF generation and manipulation, additional language enhancements like script support and JSON serialization, strengthened REST services and websockets, and increased security features.
This document provides best practices for developing SDKs. It discusses defining the SDK's purpose and services, planning the public API with an easy to use builder pattern and exceptions, planning the internal architecture with minimal dependencies and permissions, writing code with unique prefixes and lifecycle considerations, including sample apps and documentation, packaging as an AAR file, and tools for testing like Battery Historian and Stetho.
A presentation on how to debug your Drupal code. Drupal is a very powerful system and the same time it is also a very complex system. Only somebody really good at Drupal and PHP would be able to master debugging Drupal. Here is a presentation on how to equip yourself to debugging Drupal.
This document summarizes Behavior Driven Development (BDD) and its use of user stories for end-to-end testing in .NET. It discusses frameworks like SpecFlow and StoryQ that use a Given/When/Then syntax inspired by Cucumber. The document demonstrates SpecFlow using a pet rescue site, changing designs and using setups/teardowns to test features via the NUnit runner as part of continuous integration. It also mentions tools for editing Gherkin files with auto-complete and syntax highlighting.
LDOW2015 - Uduvudu: a Graph-Aware and Adaptive UI Engine for Linked DataeXascale Infolab
Uduvudu exploits the semantic and structured nature of Linked Data to generate the best possible representation for a human based on a catalog of available Matchers and Templates. Matchers and Templates are designed that they can be build through an intuitive editor interface.
Zend_Tool: Rapid Application Development with Zend FrameworkRalph Schindler
This document summarizes Ralph Schindler's presentation on Zend_Tool, a proposed set of tools for rapid application development in the Zend Framework. The presentation covers current tooling problems, proposals to address these problems including Zend_Tool_Rpc, Zend_Tool_Project and Zend_Tool_CodeGenerator. It demonstrates the prototype tool through examples and discusses advanced concepts like using the tool to generate domain models from database schemas. The presentation concludes with next steps and asking for community feedback.
Despite all of the recent interest, concurrency in standard C++ is still barely in its infancy. This talk uses the primitives supplied by C++14 to build a simple, reference, implementation of a task system. The goal is to learn to write software that doesn’t wait.
Doing Quality Assurance in PHP projects sometimes looks like a dark art! Picking the right tools, making all tools work together, analysing your code and even then deliver all the required features of the software project can be quite challenging.
This talks aims to help lowering the entry barrier for doing QA on your project, sharing the experience, knowledge and some tricks that brings QA back from the dark arts to the every day of a PHP programmer.
We will review tools like Jenkins, PHPUnit, phpcs, pdepend, phpcpd, etc and how we can chain them together to make sure we are building a great software.
Structuring An ABAP Report In An Optimal WayBlackvard
Spaghetti code? Do you want to get rid of it now? Are your ABAP reports not structured well enough? Join Blackvard's CEO Lukas Dietzsch in this complimentary webinar as he demonstrates how to structure SAP ABAP reports in an optimal way, using several new development tools now available in Eclipse.
Interactive Walkthrough in Virtual Cities and its Applications in Urban Design - Master's Thesis Defense Presentation - 2009 November 9 - Khaled Mohamed Ahmed Abd El Gawad - University of Alexandria - Institute of Graduate Studies and Research - Department of Information Technology
This document outlines session 4 of a course on managing people for peak performance. The session focuses on time management and productivity, covering topics like to-do lists, prioritization, delegation, productivity metrics, and eliminating time wasters. It provides guidance on creating effective to-do lists, prioritizing tasks using a grid system, properly delegating work through several steps, measuring productivity, and addressing the top three daily time wasters like email and unproductive meetings. Templates and examples are given to demonstrate techniques for improving personal and team productivity.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
1. SCRIPTING IN RHINO
KAUST ‐ April, 2011
Geometric Modeling and Scientific Visualization CenterGeometric Modeling and Scientific Visualization Center
Khaled Mohamed Ahmed Abd El Gawad
www.khaledarch.comwww.khaledarch.com
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
2. Outline
Introduction
VBScript Essentials
Operators and functionsp
Conditional Execution/Branching
Arrays
Surface and Polysurface MethodsSurface and Polysurface Methods
Show Cases
Grasshopper Overview
Useful Resources
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
Useful Resources
8. Scripting vs. Programming Languages.
These days, the line between a scripting language and
i l i bl da programming language is blurred.
Scripting Languages:
Run Inside other programsRun Inside other programs
Are not compiled.
A t d t it Are easy to use and easy to write.
Scripting languages are used to build complex
software.
Scripting languages are so efficient
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
p g g g
9. Macros
Rhinoceros is based on
a command linea command‐line
interface.
A macro is a prerecorded list of orders for Rhino to
executeexecute.
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
17. Flow Control
We use it to skip certain lines of code or
To execute others more than once.
To jump to different lines in our script and back again.To jump to different lines in our script and back again.
You can add conditional statements to your code You can add conditional statements to your code
which allow you to shield off certain portion
3/12/2014 17
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
18. Variable Data
From a programmer's point of view, a variable is a
location in your computer's memory in which you canlocation in your computer s memory in which you can
store a value and from which you can later retrieve
that valuethat value.
A visual representation of memory
3/12/2014 18
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
A visual representation of memory
19. Variable Data
Whenever we need to store data or perform
calculations or logic operations we need variables tocalculations or logic operations we need variables to
remember the results.
33 33..44 datadata
X Y Variable name
3/12/2014 19
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
X Y Variable name
25. Variable Data: Strings
When using & you can treat numeric variables as
StringsStrings
3/12/2014 25
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
27. Using Variables
Variable Declaration:
W ll d l i bl i h Di We normally declare a variable using the Dim
keyword.
We can declare multiple variables using a singleWe can declare multiple variables using a single
Dim keyword if we comma‐separate them.
3/12/2014 27
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
28. Using Variables
Variable Names:
I i d d fi It is recommended to use prefixes.
Use a 3 character prefix which indicates the type of
variable
V i bl t P fi E lVariable type Prefix Example
Boolean bln blnSuccess
Integer int intX
Double dbl dblYDouble dbl dblY
String str strfood
3/12/2014 28
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
29. Using Variables
Variable Assignment:
B f f i bl Before you can use any of your variables, you must
first assign them a value.
3/12/2014 29
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
31. Operators and Functions
Th i fi t i th f ll i The previous figure contains the followings:
Numbers (15, 26, 2.33 and 55)
Variables (x, y, and z)
Operators ( =, +, * and /)p ( , , /)
Functions (Sin, Sqr, Tan and Log)
3/12/2014 31
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
32. Operators in RhinoScript
Arithmetic Operators
C i O Concatenation Operators
Comparison Operators
Logical and bitwise Operators
3/12/2014 32
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
33. Operators in RhinoScript
Arithmetic Operators
C i O Concatenation Operators
Comparison Operators
Logical and bitwise Operators
3/12/2014 33
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
34. Operators in RhinoScript
Operator Precedence
The acronym PEMDAS or "Please Excuse My Dear
Aunt Sally" is common.
It stands for Parentheses, Exponents,
Multiplication, Division, Addition, Subtraction.Multiplication, ivision, Addition, Subtraction.
3/12/2014 34
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
35. Operators in RhinoScript
Operator Precedence
B d i i f h ld d h Based on previous info how could we code the
following?
PEMDAS
3/12/2014 35
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
36. Operators in RhinoScript
Operator Precedence
B d i i f h ld d h Based on previous info how could we code the
following?
PEMDAS
Solution:
y = Sqr(x ^ 2 + (x ‐ 1)) / (x ‐ 3) ) + Abs( (2 * x) / (x ^ (0.5 * x))
Solution:
3/12/2014 36
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
37. Operators in RhinoScript
Operator Precedence
T i lif h i d i To simplify the equation we can spread it out over
multiple lines of code
y = Sqr(x ^ 2 + (x ‐ 1)) / (x ‐ 3) ) + Abs( (2 * x) / (x ^ (0.5 * x))
3/12/2014 37
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
38. Operators in RhinoScript
Arithmetic Operators
C i O Concatenation Operators
Comparison Operators
Logical and bitwise Operators
3/12/2014 38
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
39. Operators in RhinoScript
Arithmetic Operators
C i O Concatenation Operators
Comparison Operators
Logical and bitwise Operators
3/12/2014 39
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
40. Operators in RhinoScript
Arithmetic Operators
C i O Concatenation Operators
Comparison Operators
Logical and bitwise Operators
3/12/2014 40
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
47. Functions in RhinoScript
Microsoft VBScript has 89 built in functions:
Sin(n) Sine of a number
Cos(n) Cosine of a numberCos(n) Cosine of a number
Atn(n) ArcTangent of a number
Log(n) Natural logarithm of a number larger than 0
Sqr(n) Square root of any positive numberSqr(n) Square root of any positive number
Abs(n) Absoluter (positive) value of any number
3/12/2014 47
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
48. Functions in RhinoScript
Rhino adds over 200 functions called methods:
Rhino.command (“_Move 0, 0, 0 2, 0, 1”)
Rhino.UnselectAllobjects()Rhino.UnselectAllobjects()
Rhino.Selectobject (strCurveID)
Rhino.Copyobject (strCurveID)
Rhino.GetObject (“Select an object”)Rhino.GetObject ( Select an object )
3/12/2014 48
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
49. What is a Function?
A function is a closed body of code that executes a
specific taskspecific task.
A function is like a black box.
It takes in input,
does something with it does something with it,
and then spits out an answer.
A function may not take any inputs at all or it may not
return anything at all.return anything at all.
3/12/2014 49
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
51. Why Would We Need Functions?
we can write it as a single function and access the
same function again and again as many times as it issame function again and again as many times as it is
required.
We can avoid writing redundant code of some
instructions again and again.
Programs with using functions are compact & easy to
understand.understand.
Testing and correcting errors is much easier.
3/12/2014 51
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
55. Script File Structure
Option Explicit:
It is optional, but it is highly
recommended.
If you use it, you have to define all
your variables before you can useyour variables before you can use
them.
If you don’t use it your variables If you don t use it, your variables
will be declared for you by the
compilercompiler.
3/12/2014 55
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
56. Script File Structure
Option Explicit:
It may also contains a set of
comments.
Comments are blocks of text in the
script which are ignored by thescript which are ignored by the
compiler and the interpreter.
comments are used to add comments are used to add
explanations to a file, or to disable
certain lines of codecertain lines of code.
Comments are always preceded by
3/12/2014 56
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
an apostrophe.
57. Script File Structure
Global Variables:
They are optional.
Typically you do not need globalTypically you do not need global
variables and you're usually better
off without them.off without them.
3/12/2014 57
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
63. IF….Then Statement
If we have three different situations:
1. If the object is a curve, delete it.
2. If the object is a short curve, delete it.2. If the object is a short curve, delete it.
3. If the object is a short curve, delete it, otherwise
it t th “ ” lmove it to the “curves” layer.
How would this be implemented using RhinoScript?
3/12/2014 63
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
64. IF….Then Statement
If we have three different situations:
1. If the object is a curve, delete it.
2. If the object is a short curve, delete it.2. If the object is a short curve, delete it.
3. If the object is a short curve, delete it, otherwise
it t th “ ” lmove it to the “curves” layer.
How would this be implemented using RhinoScript?
This is so easy. We just need to learn how
conditional syntax works.
3/12/2014 64
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
y
80. Select … Case (Sort objects based on type)
If h lIf h lIf the layer we are If the layer we are
about to assign does about to assign does
not yet existnot yet existnot yet exist…not yet exist…
3/12/2014 80
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
83. Looping
Executing certain lines of code more than once is
called looping in programming slangcalled looping in programming slang.
The two most important syntax for loops:
Conditional Loops (Do loop Do While loop Conditional Loops (Do…loop, Do While…loop,
Do Until…loop)
Incremental loops (For...Next)
3/12/2014 83
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
87. Conditional loops: Do…Loop
5: Main function declaration
6 W d l i bl hi h i bl f t i 6: We declare a variable which is capable of storing a
Rhino object ID
3/12/2014 87
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
90. Conditional loops: Do…Loop
10: Starting the loop
11 W d t h th t t d 11: We need to change the text once every second.
The Rhino.Sleep() method will pause Rhino for the
specified amo nt of milliseconds
3/12/2014 90
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
specified amount of milliseconds.
99. Arrays
An array is a list of variables.
Arrays start counting at zero.
The first element of an array is the element withThe first element of an array is the element with
index 0.
Arrays are just like other variables in VBScript with Arrays are just like other variables in VBScript with
the exception that we have to use parenthesis to set
and retrieve valuesand retrieve values.
3/12/2014 99
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
101. Arrays
you can also use a shorthand notation in which case
h h h h blyou have to omit the parenthesis in the variable
declaration:
The Array() function in VBScript takes any number of The Array() function in VBScript takes any number of
variables and turns them into an array.
You can add as many arguments as you like
3/12/2014 101
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com
106. Basic 3D Geometry: Dynamic Creation
Add Sphere
Exercise
Add Box
Add Cylinder
Please write a script
b
Exercise
Add Cylinder
Add Cone
to create a Box by
getting the length,
width and the height
Add Torus
width and the height
from the user.
Please do the samePlease do the same
for Cylinder, cone
and Torus
3/12/2014 106
Khaled Abd El Gawad – All rights reserved – www.khaledarch.com