SlideShare uma empresa Scribd logo
1 de 66
Trip on trig
ALLA SCOPERTA DELLA TRIGONOMETRIA
ELEONORA ROCCHI
➔
➔
➔
➔
eleonora-rocchi
★ Ripasso delle basi della trigonometria
★ Supporto da parte dei browser delle funzioni trigonometriche
★ Esempi concreti di utilizzo
Di che parliamo oggi?
Cos’è la trigonometria?
@Wikipedia
Concetti fondamentali: il triangolo
Concetti fondamentali: le misure
sin 𝜃 =
Opposto
Ipotenusa
Adiacente
Ipotenusa
Opposto
Adiacente
cos 𝜃 =
tg 𝜃 =
●
●
Perché queste funzioni sono importanti?
●
●
Concetti fondamentali: le misure
sin 𝜃 =
Opposto
Ipotenusa
sin 39° =
d
30
=
d
30
sin 39°
=
d
30
0,6293
= 0,6293 x
d 30
= 18,88
d
⇒
⇒
⇒
⇒
sec 𝜃 =
1
cos 𝜃
1
sin 𝜃
1
tg 𝜃
cosec 𝜃 =
cotg 𝜃 =
Altre funzioni
E con le inverse:
@Wikipedia
prendono un valore numerico come argomento e restituiscono l'angolo corrispondente.
Possiamo esprimere le funzioni trigonometriche
attraverso le relazioni
periodica definita per tutto l’insieme dei numeri reali
@Youmath
Ma che c’entra tutto ciò con il CSS?
Il gruppo di lavoro sul CSS del World Wide
Web Consortium (W3C) approva le funzioni
trigonometriche.
Ora i browser ci permettono di utilizzare
direttamente queste funzioni senza
appesantire i progetti con librerie javascript
e senza l'obbligo di ricorrere a
preprocessori.
Febbraio 2019
metodi semplici angoli
sincronizzare sequenze di animazione
Ma perchè?
● calc() per fare calcoli
● min(), max() e clamp()
● sin(), cos(), tan(),
● asin(), acos(), atan() e atan2()
● cos()
● sin()
● tan()
MDN Web Docs
● cos()
● sin()
● tan()
● asin()
● acos()
● atan()
● atan2()
Casi d'uso di base secondo la documentazione MDN
ESEMPI
Trasferire gli oggetti su un percorso circolare attorno a un punto centrale
Adiacente = cos 𝜃 * Ipotenusa
Opposto = sin 𝜃 * Ipotenusa
Dati noti
Ipotenusa = raggio
𝜃 è l’angolo relativo al punto in oggetto
https://codepen.io/eleonorarocchi/pen/OJoqrVY
https://codepen.io/eleonorarocchi/pen/OJoqrVY
https://codepen.io/eleonorarocchi/pen/MWqxdZZ
Ruotare un oggetto attorno ad un punto
atan2()
https://codepen.io/eleonorarocchi/pen/dyqrXOz
https://codepen.io/eleonorarocchi/pen/qByNyWO
https://codepen.io/eleonorarocchi/pen/ExpZyPG
https://codepen.io/jh3y/pen/RwBoEVM
Compiti per casa
https://codepen.io/thebabydino/pen/wvybyMo
Nastro di Möbius
https://codepen.io/MackFitz/pen/JjaBpVw
Dodecaedro con facce a stella
https://codepen.io/MackFitz/pen/JjaBpVw
E tu che ci faresti?
Trip on trig
ALLA SCOPERTA DELLA TRIGONOMETRIA
https://joind.in/talk/20d33

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

trip_on_trig_cssday_2023.pptx

Notas do Editor

  1. Women Techmakers Ambassador è un programma che supporta le donne nel settore della tecnologia
  2. A CHI SERVE LA TRIGONOMETRIA? La trigonometria serve soprattutto a 3 categorie di persone: ai cartografi ai naviganti (ed astronomi) ma soprattutto agli scrittori di libri di trigonometria
  3. Proprietà offset per calcolare la distanza tra i punti (60 ° l’uno dall’altro) --angle = 0 Posizione è data da cos(0 + 60) * raggio sen(0 + 60) * raggio
  4. ATTENZIONE JAVASCRIPT
  5. Passiamo come proprietà le coordinate della posizione del mouse
  6. Dati due punti x e y, la funzione atan2(y, x) restituisce l'angolo tra l'asse x positivo e la semiretta dall'origine al punto (x, y). Dalle coordinate del mouse sottraiamo la dimensione dell’immagine che stiamo ruotando, per la x e per la y
  7. Sapete che nella property background si possono definire diversi layer, pertanto andiamo a definirli sfruttando le funzioni trigonometriche.