Espirògraf

Infotaula jocEspirògraf
Tipusjoguina Modifica el valor a Wikidata
Data de creació1965 Modifica el valor a Wikidata

L'espirògraf és una joguina de dibuix geomètric que permet traçar corbes matemàtiques estil ruleta, tècnicament conegudes com a hipotrocoide i epitrocoide. Va ser desenvolupat per l'enginyer britànic Denys Fisher i venut per primera vegada el 1965.

En computació, la idea es pot ampliar de forma recursiva per generar un espirògraf fractal, on el cercle generatiu actua a la vegada de cercle directiu d'un de més petit, i així successivament generant cada vegada més detall en el traç final d'una manera similar a les sèries de Fourier complexes. Dit d'una altra manera, un espirògraf bàsic de dos cercles (l'immòbil, anomenat directiu, i el que fa la rotació, anomenat generatiu) es pot considerar el cas més simple d'una família de corbes trocoides.

Dibuixant amb espirògraf

Base matemàtica

Es necessiten definir varis de paràmetres per construir un espirògraf; el nombre total de cercles directius (n), la ratio entre els radis dels diferents cercles (m), la ratio entre la velocitat de gir dels diferents cercles (k), i la distància de cada cercle (d) respecte el centre de l'anterior.

El radi del cercle actual es calcula utilitzant la ratio descrita, .

La distància del cercle actual respecte el centre es calcula tenint en compte el radi del cercle anterior i el del cercle actual, , aplicant la suma en el cas de l'epitrocoide i la resta en el de l'hipotrocoide.

La velocitat de gir es calcula partint de la velocitat de gir del cercle anterior i aplicant una ratio constant. Aquesta ratio és gairebé sempre negativa, és a dir, la direcció de rotació va alternant-se a cada cercle.

La fórmula més bàsica seria . Aquesta velocitat és la que s'utilitza per actualitzar l'angle .

Obtenim la posició de cada cercle:

Aquesta posició de l'últim cercle serà la utilitzada per aplicar el traçat final de l'espirògraf.

Exemple en pseudocodi:

// Definir els paràmetres necessaris
n = 11
r_ratio = 3
d_prev = 0.5
d_current = 0.5
k = -4

// Crear el cercle inicial
ary orbits = []
circle = Circle.new(size) // Mida del cercle immòbil
// Emmagatzemar tota la informació necessària del cercle
orbit = Orbit.new(circle, d=0, angle=0, speed=1)
orbits.push(o)

// Crear cadascun dels cercles partint de l'anterior
for i in 1...n
 prev = orbits[i - 1]
 size = previous.circle.size / r_ratio
 circle = Circle.new(size)
 circle.x = prev.circle.x
 circle.y = prev.circle.y
 d = previous.ciecle.size * d_prev + circle.size * d_current
 angle = previous.angle
 speed = previous.speed * k
 orbit = Orbit.new(circle, d, angle, speed)
 orbits.push(orbit)
end

// Actualitzar el dibuix canviant l'angle constantment
loop do
 // Actualitzar la posició de cada cercle
 Graphics.update
 for i in 1...orbits.size
 prev = orbits[i - 1]
 orbit = orbits[i]
 orbit.angle += orbit.speed
 d = orbit.distance
 dx = prev.circle.x + d * Math.sin(angle)
 dy = prev.circle.y + d * Math.cos(angle)
 end
 // Traçar el dibuix
 last = orbits[-1].circle
 if (last_drawn != NULL)
 sx = last_drawn.x
 sy = last_drawn.y
 draw_line(sx, sy, last.x, last.y)
 else
 set_pixel(last.x, last.y)
 end
 last_drawn = Point.new(last.x, last.y)
end

Bibliografia

  • Maurer, Peter M. «A Rose is a Rose...». The American Mathematical Monthly, 94, 7, 1987, pàg. 631-645 [Consulta: 24 octubre 2021].

Enllaços externs

Read other articles:

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (يوليو 2019) الحدثكأس اسكتلندا 1976–77 نادي سلتيك نادي رينجرز 1 0 التاريخ4 مايو 1977  الملعبهامبدن بارك  الحكمبوب فالنت...

 

Societal failure to adapt to disabilities A short government advisory animation on the social model of disability Disability Theory and models Disability theory Ableism / Disablism Medical model Social model Education Mainstreaming Individualized Education Program (IEP) Special needs Special school Special education Learning disability Therapy Physical Occupational Speech Societal implications Disability rights movement Inclusion Normalization People-first language Pejorative terms S...

 

Mayan deity The Classic period Maya moon goddess may have been a forerunner of Awilix Awilix (/äwiˈliʃ/) (also spelt Ahuilix, Auilix and Avilix) was a goddess (or possibly a god) of the Postclassic Kʼicheʼ Maya, who had a large kingdom in the highlands of Guatemala.[1] She was the patron deity of the Nijaʼibʼ noble lineage at the Kʼicheʼ capital Qʼumarkaj, with a large temple in the city. Awilix was a Moon goddess and a goddess of night,[2] although some studies refe...

Sports season1961–62 AHL seasonLeagueAmerican Hockey LeagueSportIce hockeyRegular seasonF. G. Teddy Oke TrophySpringfield IndiansSeason MVPFred GloverTop scorerBill SweeneyPlayoffsChampionsSpringfield Indians  Runners-upBuffalo BisonsAHL seasons← 1960–611962–63 → The 1961–62 AHL season was the 26th season of the American Hockey League. The league initiates the James C. Hendy Memorial Award for outstanding team or league executives. The league resumes East and ...

 

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أكتوبر 2015) اضغط هنا للاطلاع على كيفية قراءة التصنيف دودة أوراق الزيتون الخضراء   المرتبة التصنيفية نوع  التصنيف العلمي  فوق النطاق  حيويات مملكة عليا  خيط...

 

Folco d'AngiòIl re Folco in una miniatura del XIII secoloRe di GerusalemmeStemma In carica21 agosto 1131 –13 novembre 1143(con la moglie Melisenda) Incoronazione14 settembre 1131 PredecessoreBaldovino II SuccessoreBaldovino III con Melisenda Conte d'Angiòcome Folco VIn carica1109 –1129 PredecessoreFolco IV SuccessoreGoffredo V Conte del Mainecome Folco IIn carica1110 –1129(con la moglie Eremburga fino al 1126) PredecessoreElia I SuccessoreGoffredo I NascitaAngers,...

Extinct baronetcy in the Baronetage of Ireland The Godfrey Baronetcy of Bushfield in the County of Kerry was a title in the Baronetage of Ireland.[1] It was created on 17 June 1785 for William Godfrey, member of the Irish House of Commons for Tralee. The title became extinct on the death of the seventh Baronet in 1971.[2] The Godfrey family had arrived in Ireland during the Cromwellian conquest. Major John Godfrey of Kent was an officer in the New Model Army, and was granted t...

 

This article's lead section may be too short to adequately summarize the key points. Please consider expanding the lead to provide an accessible overview of all important aspects of the article. (September 2021) Trade can be a key factor in economic development. The prudent use of trade can boost a country's development and create absolute gains for the trading partners involved. Trade has been touted as an important tool in the path to development by prominent economists. However trade may n...

 

Military unit This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: 500th SS Parachute Battalion – news · newspapers · books · scholar · JSTOR (January 2013) (Learn how and when to remove this message) Soldiers of the battalion are getting ready for Operation Rösselsprung The 500th SS-Parachute Battalion (German:...

Voce principale: Calcio Como. Associazione Calcio ComoStagione 1956-1957Sport calcio Squadra Como Allenatore Hugo Lamanna Presidente Francesco Ambrosoli Serie B7º posto Maggiori presenzeCampionato: Bellini, Cuttica, Marsili (32) Miglior marcatoreCampionato: Baldini (11) 1955-1956 1957-1958 Si invita a seguire il modello di voce Questa pagina raccoglie le informazioni riguardanti l'Associazione Calcio Como nelle competizioni ufficiali della stagione 1956-1957. Indice 1 Stagione 2 Divise...

 

土库曼斯坦总统土库曼斯坦国徽土库曼斯坦总统旗現任谢尔达尔·别尔德穆哈梅多夫自2022年3月19日官邸阿什哈巴德总统府(Oguzkhan Presidential Palace)機關所在地阿什哈巴德任命者直接选举任期7年,可连选连任首任萨帕尔穆拉特·尼亚佐夫设立1991年10月27日 土库曼斯坦土库曼斯坦政府与政治 国家政府 土库曼斯坦宪法 国旗 国徽 国歌 立法機關(英语:National Council of Turkmenistan) ...

 

Trinidad and Tobago association football player For other people with similar names, see Dwight York. Dwight YorkeCM Yorke in 2012Personal informationFull name Dwight Eversley Yorke[1]Date of birth (1971-11-03) 3 November 1971 (age 52)[1]Place of birth Canaan,[1] Trinidad and TobagoHeight 1.78 m (5 ft 10 in)[2]Position(s) Forward, wingerYouth career1988–1989 Signal Hill Comprehensive School1989–1990 Aston VillaSenior career*Years Team Ap...

 烏克蘭總理Прем'єр-міністр України烏克蘭國徽現任杰尼斯·什米加尔自2020年3月4日任命者烏克蘭總統任期總統任命首任維托爾德·福金设立1991年11月后继职位無网站www.kmu.gov.ua/control/en/(英文) 乌克兰 乌克兰政府与政治系列条目 宪法 政府 总统 弗拉基米尔·泽连斯基 總統辦公室 国家安全与国防事务委员会 总统代表(英语:Representatives of the President of Ukraine) 总...

 

Europe Template‑class Europe portalThis template is within the scope of WikiProject Europe, an effort to build a comprehensive and detailed guide to European topics of a cross-border nature on Wikipedia.EuropeWikipedia:WikiProject EuropeTemplate:WikiProject EuropeEurope articlesTemplateThis template does not require a rating on Wikipedia's content assessment scale. This template was considered for merging with Template:EU dependencies on 5 November 2013. The result of the discussion was no ...

 

Traffic police and de facto state police in the US state of Kansas Law enforcement agency Kansas Highway PatrolPatch of the Kansas Highway PatrolLogo of the Kansas Highway PatrolBadge of the Kansas Highway PatrolFlag of KansasAbbreviationKHPMottoService · Courtesy · ProtectionAgency overviewFormed1937; 87 years ago (1937)Preceding agencyKansas Motor Vehicle InspectorsEmployees738 (2023)[1]Annual budget$110,457,688 (2023)[2]Legal personalityState agencyJuris...

Terminal Lempake Terminal Lempake adalah salah satu terminal perhubungan darat di Kota Samarinda, Kalimantan Timur. Terminal ini berlokasi di Jl. D.I Panjaitan, Lempake. Terminal ini menampung bus-bus yang melayani rute Balikpapan-Samarinda-Bontang-Sangatta. Pranala luar Citra Satelit Terminal Lempake di Wikimapia Artikel bertopik transportasi ini adalah sebuah rintisan. Anda dapat membantu Wikipedia dengan mengembangkannya.lbs

 

The Beatles performing on The Ed Sullivan Show on February 9, 1964 The Beatles made several appearances on The Ed Sullivan Show, including three in February 1964 that were among their first appearances in front of an American audience. Their first appearance, on February 9, was seen by over 73 million viewers and came to be regarded as a cultural watershed that launched American Beatlemania—as well as the wider British Invasion of American pop music[1]—and inspired many young vie...

 

Metro station in Tianjin, China This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.Find sources: Jingjianglu station – news · newspapers · books · scholar · JSTOR (March 2015) Jingjianglu靖江路General informationOther namesJingjiang RoadLocationHedong District, TianjinChinaOperated byTianjin Metro Co. Ltd.Line(s...

  هذه المقالة عن أبو عوانة الإسفراييني. لمعانٍ أخرى، طالع الإسفراييني. أبو عوانة الإسفراييني معلومات شخصية مكان الميلاد نيسابور تاريخ الوفاة 928[1] مواطنة الدولة العباسية  الديانة الإسلام، أهل السنة والجماعة، شافعية الحياة العملية تعلم لدى أبو زرعة الرازي،  و...

 

Armed forces of the Holy Roman Emperor This article is about the army of the Holy Roman Emperor in his personal capacity. For the army of the Empire itself, see Army of the Holy Roman Empire. This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (September 2021) (Learn how and when to remove this message) An imperial cuirassier in the War of the Polish Succession be...