---
title: Klein Bottle; R (D)COM; R2HTML
date: '2007-06-06T22:19:12+08:00'
slug: klein-bottle-r-dcom-r2html
---

"Klein Bottle" is really a strange surface; can you imagine such a "bottle"? 

[![](https://math1.cgu.edu.tw/mediawiki-1.9.3/images/gnuplot/2547f0cb18ec91f6f723929df6baccad.png)](http://math1.cgu.edu.tw/mediawiki-1.9.3/index.php?title=Main_Page) 

And this animated one? 

[![](https://user-images.githubusercontent.com/163582/50254780-0a670b80-03b5-11e9-95d4-e9326cdfbd7b.gif)](http://alem3d.obidos.org/en/struik/kbottle/) 

I spent more than an hour trying to make a perspective plot using R but failed at last, because [the equations for Klein Bottle](http://mathworld.wolfram.com/KleinBottle.html) is a little bit complex and I don't know how to find a proper function to denote _z_ by _x_ and _y_. 

In the next few days, I will concentrate on [R (D)COM](http://sunsite.univie.ac.at/rcom/) and the package "R2HTML" in order to make better use of R in other Windows applications such as Excel. On second thoughts, I believe I should avoid programming using C++ because I'm not familiar with it at all and I'd better develop easier applications instead. 

---

An irrelevant quotation: 

> "Democracy means that anyone can grow up to be president, and anyone who doesn't grow up can be vice president." 
> 
> --- Johnny Carson
