INFORMATICA GRAFICA – SSD ING-INF/05 Sistemi di elaborazione delle informazioni a.a. 2007/2008 LEZIONE DI TEORIA Introduzione al PLaSM.

Slides:



Advertisements
Presentazioni simili
Trieste, 26 novembre © 2005 – Renato Lukač Using OSS in Slovenian High Schools doc. dr. Renato Lukač LinuxDay Trieste.
Advertisements

Anno Diaconale f Federazione delle Chiese Evangeliche in Italia ufficio volontariato internazionale via firenze 38, roma tel. (+39) fax.
Centro Internazionale per gli Antiparassitari e la Prevenzione Sanitaria Azienda Ospedaliera Luigi Sacco - Milano WP4: Cumulative Assessment Group refinement.
I numeri, l’ora, I giorni della settimana
L’esperienza di un valutatore nell’ambito del VII FP Valter Sergo
Cache Memory Prof. G. Nicosia University of Catania
Prof. Stefano Bistarelli
Teoria e Tecniche del Riconoscimento
1 Teaching Cloud Computing and Windows Azure in Academia Domenico Talia UNIVERSITA DELLA CALABRIA & ICAR-CNR Italy Faculty Days 2010.
A. Oppio, S. Mattia, A. Pandolfi, M. Ghellere ERES Conference 2010 Università Commerciale Luigi Bocconi Milan, june 2010 A Multidimensional and Participatory.
EBRCN General Meeting, Paris, 28-29/11/20021 WP4 Analysis of non-EBRCN databases and network services of interest to BRCs Current status Paolo Romano Questa.
DG Ricerca Ambientale e Sviluppo FIRMS' FUNDING SCHEMES AND ENVIRONMENTAL PURPOSES IN THE EU STRUCTURAL FUNDS (Monitoring of environmental firms funding.
Laurea Magistrale in Informatica Thecnologies for Innovation
JPA Overview della tecnologia. Java Persistence Architecture Definita nella JSR-220 EJB 3.0 ( Tentativo di unificare EJB2.1 con.
Interrogativi Asking and answering questions in italiano.
© and ® 2011 Vista Higher Learning, Inc.4B.2-1 Punto di partenza The verbs conoscere and sapere both mean to know. The choice of verb depends on its context.
Il presente del congiuntivo (the present subjunctive)
Dipartimento di Matematica Applicata Università di Firenze Multiband transport models for semiconductor devices Giornata di lavoro sulle Nanoscienze Firenze.
Unified Modeling Language class C {…} class B extends C {…} Esiste una notazione grafica per mostrare le relazioni di ereditarietà. Object StringC B Tutte.
J0 1 Marco Ronchetti - Corso di Formazione Sodalia – Febbraio 2001 – Modulo Web Programming Tomcat configuration.
C Consiglio Nazionale delle Ricerche - Pisa Iit Istituto per lInformatica e la Telematica Reasoning about Secure Interoperation using Soft Constraints.
Biometry to enhance smart card security (MOC using TOC protocol)
Quale dei seguenti composti può comportarsi da acido di Broensted ? Quale è la relativa reazione con una base? Cl -, HSO 4 -, NH 4 +, NH 3, H 2 S, OH -
Costruzione di Interfacce Lezione 10 Dal Java al C++ parte 1
TIPOLOGIA DELLE VARIABILI SPERIMENTALI: Variabili nominali Variabili quantali Variabili semi-quantitative Variabili quantitative.
Ergo : what is the source of EU-English? Standard British English? Standard American English? Both!!!! See morphology (use of British.
LInnovazione di Prodotto. Lo sviluppo di nuovi prodotti e nuovi servizi: una vecchia sfida per le imprese innovative. [emilio bellini]
Segmentation C. Andrés Méndez 17/04/2013. Where to find the presentations?
1. Conoscere luso delle collezioni in Java Comprendere le principali caratteristiche nelle varie classi di Collection disponibili Saper individuare quali.
2000 Prentice Hall, Inc. All rights reserved. 1 Capitolo 3 - Functions Outline 3.1Introduction 3.2Program Components in C++ 3.3Math Library Functions 3.4Functions.
SQL Esercitazione per il corso “Basi di Dati” Gabriel Kuper
Magnetochimica AA Marco Ruzzi Marina Brustolon
Metadati gestionali e amministrativi per oggetti digitali nativi Antonio Scolari Seminario nazionale sui metadati Roma, 3 aprile 2001.
DISSIMILARITIES AND MATCHING BETWEEN SYMBOLIC OBJECTS Prof. Donato Malerba Department of Informatics, University of Bari, Italy ASSO.
2000 Prentice Hall, Inc. All rights reserved. 1 Capitolo 6: Classi e astrazione dati 1.Introduzione 2.Definizione delle strutture 3.Accedere ai membri.
DISSIMILARITIES AND MATCHING BETWEEN SYMBOLIC OBJECTS Prof. Donato Malerba Department of Informatics, University of Bari, Italy ASSO.
VARO SRL LOGISTIC, QUALITY, SERVICE
ATE / 31 Lezione 3 i sistemi automatici di misurazione - gli ATE.
“Su alcuni problemi nella Teoria dei Linguaggi Formali”
Players: 3 to 10, or teams. Aim of the game: find a name, starting with a specific letter, for each category. You need: internet connection laptop.
LHCf Status Report Measurement of Photons and Neutral Pions in the Very Forward Region of LHC Oscar Adriani INFN Sezione di Firenze - Dipartimento di Fisica.
SOURCE TERM ON NPP SAFETY ANALYSES Marino Mazzini Professore Ordinario nel s.s.d. Impianti Nucleari Università di Pisa Facoltà di Ingegneria Dipartimento.
Concord A tool for the analysis and concordances of the terminological constituents P. Plini, N. Mastidoro* * - Èulogos, Rome Institute for Atmospheric.
Francesca Pizzorni Ferrarese 05/05/2010
realizzazione app per Google Android OS
Palermo, may 2010 F.Doumaz, S.Vinci (INGV-CNT- Gruppo di telerilevamento)
Ischia, giugno 2006Riunione Annuale GE 2006 Exploiting the Body Effect to Improve Analog CMOS Circuit Performances *P. Monsurrò, **S. Pennisi, *G.
Guardate le seguenti due frasi:
ISTITUTO DI SCIENZE E TECNOLOGIE DELLA COGNIZIONE Piero Cosi SEZIONE DI PADOVA - FONETICA E DIALETTOLOGIA Via Martiri della libertà, 2 – adova (Italy)
/ Elementi di C++ Introduzione a ROOT , Laboratorio Informatico ROOT warm up , Laboratorio Informatico Introduzione a.
Funzioni stringhe. chr Restituisce il carattere di un valore ascii dato. Per vedere lelenco dei codici ascii clicca QQQQ uuuu iiiiEsempio
Tutor: Elisa Turrini Mail:
Project Review Novembrer 17th, Project Review Agenda: Project goals User stories – use cases – scenarios Project plan summary Status as of November.
UG40 Energy Saving & Twin Cool units Functioning and Adjustment
Collection & Generics in Java
EMPOWERMENT OF VULNERABLE PEOPLE An integrated project.
PLURALI - with NOUNS PAY ATTENTION TO THE ENDING OF THE NOUN! “O” ---> “I” ex) il quaderno -> i quaderni “A” ---> “E” ex) la matita -> le matite “E” --->
Introduction to automatic ABMs documentation Keywords: Doxygen ODD protocol MASON documentation Simone Romano.
UITA Genève ottobre Comitè du Groupe Professionnel UITA Genève octobre 2003 Trade Union and Tour.
Guida alla compilazione del Piano di Studi Curricula Sistemi per l’Automazione Automation Engineering.
Saluti ed espressioni Greetings in Italian.
Lezione n°27 Università degli Studi Roma Tre – Dipartimento di Ingegneria Corso di Teoria e Progetto di Ponti – A/A Dott. Ing. Fabrizio Paolacci.
Ratifica dei trattati internazionali - Italia Art. 87 Costituzione “Il Presidente della Repubblica…ratifica i trattati internazionali, previa, quando occorra,
Final Review Meeting Livorno, Italy January 30-31, 2012
Well and Truly by Roni Horn. Mind map Artist’s name Techniques Life Groupworks Artworks My opinion Her message My artwork inspiried by…
MSc in Communication Sciences Program in Technologies for Human Communication Davide Eynard Facoltà di scienze della comunicazione Università della.
X. Specifications (IV).
Studente : Andrea Cassarà Classe: 5AII A.S. 2014/2015 Link Sito
Information In March we decided to start to work on this topic in strong collaboration with Roma 1 group: Ferrante (50-70%), Braccini (50-70%), Torre (100%),
Transcript della presentazione:

INFORMATICA GRAFICA – SSD ING-INF/05 Sistemi di elaborazione delle informazioni a.a. 2007/2008 LEZIONE DI TEORIA Introduzione al PLaSM

PLaSM NOTA: Se i lucidi non sono chiari… Rif. CAP 1 Informatica Grafica e Cad, Ed Hoepli, Aut. Paoluzzi

Plasm URL TUTORIAL DOWNLOAD

PLaSM Lattuale interprete PLaSM è scritto nei linguaggi Scheme e C++, usando una implementazione Scheme multipiattaforma chiamata PLT Scheme.

PLaSM Linterprete PLaSM è disponibile gratuitamente come software libero multipiattaforma allindirizzo di rete Lutente tipico normalmente preferirà scaricare un installer dei binari eseguibili per lambiente di calcolo preferito (Windows, Linux o MacOSX). Al contrario, un utente avanzato potrà preferire il download dei sorgenti, da ricompilare sulla sua macchina personale.

PLaSM editor Un editor integrato non è strettamente necessario, in quanto un editor standard di testo (per esempio WordPad) sarebbe sufficiente, ma sarà molto utile Un editor specializzato per PLaSM è denominato Xplode, il cui nome significa Is a PLasm Open Design Environment Xplode provvede alla colorazione della sintassi e fornisce un accesso a menu alle funzioni e librerie disponibili, alla documentazione in linea e alla valutazione su richiesta di funzioni, espressioni e sottoespressioni selezionate dallutente. Xplode viene automaticamente installato dallinstaller contenuto nel package binario scaricato dal sito

PLaSM viewer Lambiente PLaSM non offre attualmente un visualizzatore grafico integrato per i modelli generati. Esportare i modelli generati dal linguaggio in qualche formato grafico per il web, per esempio nel formato VRML (Virtual Reality Modeling Language) per la grafica 3D, oppure nei formati vettoriali SVG (Scalable Vector Graphics) o Flash per la grafica 2D. I plug-ins per visualizzare file.svg (SVG) e.swf (Flash) in un browser possono essere scaricati dai siti Adobe e Macromedia rispettivamente.

Come iniziare Instructions PLT Scheme Download the installer Double click on it Follow the instructions Install it to C:\Program Files\PLT Plasm Download the installer Double click on it Follow the instructions The installer will create a folder named C:\Program Files\plasm Xplode Download the installer Double click on it Follow the instructions The installer will add a shortcut to Xplode in the Start menu

Come iniziare Nota: se avete problemi spostate c:\Programmi\PLT -> c:\Program Files\PLT

Come iniziare (plasm DEF mycube = CUBOID: ;mycube;) ================== mycube DEFINED ================== PolComplex (plasm VRML: mycube: 'out.wrl';) Exporting object to VRML (ver 2) file format Filename = d:\scorzell\software\cpp\plasm.old\distrib\out.wrl Dimensions: Point = 3 Spatial = End of exporting phase PolComplex

Come iniziare Salvo un file mycube.psm (plasm " DEF mycube = CUBOID: ; mycube; VRML: mycube: 'out.wrl'; ") (load mycube.psm) ================== mycube DEFINED ================== PolComplex Exporting object to VRML (ver 2) file format Filename = d:\scorzell\software\cpp\plasm.old\distrib\out.wrl Dimensions: Point = 3 Spatial = End of exporting phase PolComplex

PLaSM The design language PLaSM is a geometry-oriented extension of a subset of the FL language FL (programming at Function Level) is an advanced language for functional programming developed by the Functional Programming Group of IBM Research Division at Almaden (USA)

FL programs are easily combined, so that new programs are obtained in a simple and elegant way; one may find simpler equivalent programs, both at design and at compilation times. Great advantages are so obtained in style and efficiency of program prototyping.

PLaSM PLaSM, (the Programming LAnguage for Solid Modeling) is a ``design language", developed by the CAD Group at the Universities of Roma ``La Sapienza" and ``Roma Tre"

PLaSM Among the strong points of PLaSM we cite the functional approach, which allows to compute with geometries as well with numbers and functions the dimension-independent implementation of geometric data structures and algorithms.

PLaSM very natural and powerful approach to parametric geometry combinatorial engine of the FL language, gives an amazing descriptive power when computing with geometry.

Functional languages Functional programming enjoies several good properties: –The set of rules is very small –Each rule is very simple –Program code is concise and clear –The meaning of a program is well understood (no state) –Functions both as programs and as data –Programs connected by concatenation and nesting

PLaSM a complex shape is an assembly of components, highly dependent from each other each part results from computations involving other parts a generating function is associated to each part geometric expressions appear as actual parameters

FL objects Primitive objects –characters, numbers and truth values Expressions –primitive objects, functions, applications and sequences Sequences –expressions separated by commas and contained within a pair of angle brackets:

Application Sintassi: exp1:exp2 applies the function resulting from the evaluation of exp1 on the argument resulting from the evaluation of exp2. Binary functions can also be used in infix form: +: = = 4

Application Application associates to left: f:g:h = (f:g):h Application binds stronger than composition: f:g ~ h = (f:g) ~ h

FL combining forms and functions: The construction combining form CONS allows to apply a sequence of functions to an argument producing the sequence of applications: CONS: :x = [f1,...,fn]:x =

CONS CONS:, written also [+,-], when applied to the argument gives the sequence of applications: CONS: : =[+,-]: =, - : > = ;

Apply to all (AA) The apply-to-all combining form AA –applies a function to a sequence of arguments giving a sequence of applications: –AA:f: = ; Ex. aa:+:, >=,+: >= ;

Identity (ID) The identity function ID –returns its argument unchanged: –ID:x = x; Ex. ID: = ;

Constant The constant function K –is evaluated, for whatever x2, as: –K:x1:x2 = x1; Ex. K: : =

Binary composition Binary composition ~ of functions –is defined as –(f ~ g):x = f:(g:x); Ex (- ~ (aa: - ) ) :, > = - : (, - : >) = - : ( ) = 0

N-ary composition N-ary composition COMP of functions is also allowed: COMP: :x = (f ~ h ~ g):x = f:(h:(g:x));

Conditional IF: :x = if p:x = TRUE -> f:x if p:x = FALSE -> g:x Ex. IF: : essendo EQ: ==false quindi = k:False: = False IF: : essendo EQ: ==true quindi = k:False: =False if: : = - : = 0 (false) quindi -: =0 if: : = +: = 1 (false) quindi +: =6

Insert The insert right and insert left combining forms (INSR and INSL) allow to apply a binary function on a sequence of arguments of any length: INSR : f : = f: > INSL : f : = f:, xn >, NOTA applicazione su lista di un elemento: INSR:f: = x INSL:f: = x Ex: insr:+: =+: > =+: >> =+: > =+: =6 insl:-: = -:,3> = -:,2>,3 > = -:, 3> = -: = -4

Concatenate The catenate function CAT appends any number of input sequences creating a single output sequence: CAT:,,..., > = Ex: cat:, > =

Distribute The distribute right and distribute left functions (DISTR, DISTL) generate a sequence of pairs: DISTR:, x> =,, > DISTL: > =,, > Ex distr:,0> =,, > distl: > =,, >

Selection SEL : 2 : = 4.5

Apply in composition (AC) AC : f : = f:x1~ f:x2 ~ … ~f:xn Ex. AC:SEL: :, 89, fun> = (SEL:3 ~ SEL:1):, 89, fun> = SEL:3: (SEL:1:,89,fun>) = SEL:3: ( ) = 8

Apply in sequence (AS) AS : f : = [f:x1,...,f:xn] Ex. AS:SEL: :, 89, fun> = [SEL:3, SEL:1]:, 89, fun> =, 89, fun>, SEL:1 :, 89, fun> > = >

Others repetition operator allows for instancing n times any expression: #:3:expr = catenation of repeated sequences repeats and catenates sequences: ##:3: = FROMTO operator generates integer sequences between two given extremes: FromTo: = 2..5 = INTSTO operator generates integer sequences with a given end: INTSTO:5 =

Function definition Definition: DEF fun1 (a::type1) = …. DEF fun2 (a1,...,an::type2) = …. DEF fun3 (a1::type1)(a2::type2) = …. DEF fun4 (a1::type1; a2::type2) = …. instancing: fun1 : x fun2 : fun3 : x1 : x2 fun4 :

Local functions DEF global (p1::IsType1; p2::IsType2) (q1,q2::IsType3) = ….body che fa riferimento a local1 e local2… WHERE local1 (p3::IsType3) = ….body…., local2 = …. body che fa riferimento a local 21…. WHERE local21 = …body…. END END;

Esempio: lunghezze DEF length = + ~ AA:(K:1); Ex. length: = (+ ~ AA:(K:1)): = +: (AA:(K:1): ) = +: = 4

Esempio: fattoriale DEF fact = * ~ INTSTO; Ex fact:n = (* ~ INTSTO):4 = *:(INTSTO:4) = *: = 24

PLASM, mkpol e translate (plasm" DEF House2D = STRUCT: : :window > WHERE wall = MKPOL:,,,, >, >, >>, door = CUBOID:, window = CUBOID: END; VRML:(House2D):'out.wrl'; ) 1 (0,0) 2 (8,0) 5 (0,6) 3 (8,6) 4 (4,8) T:1:2:(Cuboid ) T: : :(Cuboid: ) ************************************************* * * Welcome in * * PLaSM * * * [Programming LAnguage for Solid Modeling] * * * Version: * * Date: 24 Nov 2004 * * ************************************************* * plasm> (load "out.psm") ************************************************* * * Welcome in * * PLaSM * * * [Programming LAnguage for Solid Modeling] * * * Version: * * Date: 24 Nov 2004 * * ************************************************* * plasm> (load "out.psm") VRML plugin