Skip to main content

Posts

On Data Backup

Around 2013, every year I'd burn all my important data into a single DVD, that is 4.7GB. Nowadays I have ~5TB data, and I don't even bother optimizing 5GB data. Background I realized that it is the time to consider backup. I guess I have seen enough signs. The NAS shows that the disks are quite full. I just happened to see article and videos about data backup. I found corrupted data in my old DVDs. I realized that most of my important data are not properly backed up. I have a few scripts that manage different files, which might contains bugs. The goal is to have good coverage under acceptable cost. The Plan All my data are categorized into 4 classes. Class 1: Most Important + Frequently Accessed Rougly ~50GB in total. Average file size is ~5MB.  Examples include official documents, my artworks and source code. The plan: sync into multpile locations to maximize robustness. Sometimes I chooes a smaller subset when I don't have enough free space. In case some copies are down/...

Windows的KVM软件

 KVM即是共享鼠标键盘。 之前Windows和Ubuntu我都是用Synergy,不过最近一查发现变成收费软件了。 Github上有个fork叫Barrier,下载以后配了好久也不好用。有可能跟我的屏幕配置有关系,一个电脑连了多个显示器,而且有的显示器还是禁用。最后放弃了。 后来搜到了微软的Mouse without Borders,简单配一下就能用了,还是不错。 网址是http://aka.ms/mm

Euclidea 14.5 解法与证明

Euclidea  14.5 如图,给定三个两两相切的圆,O,O_1, O_2。三个圆心共线。 任务:尺规作出一个圆,与给定的三个圆都相切。 解法: 设圆O与圆O_1的切点为A 连接OA 过O做OA垂线交圆O于D 以D为圆心,DA为半径作圆,交圆O_1和圆O_2于E和F。 作直线EO_1和FO_2交于G 以G为圆心,GE为半径作圆 圆G即为所求圆 简要证明: 如图,设三个圆切点为A,B,C。明显A,B,C,O,O_1,O_2五点共线。 以A为中心作反演变换,取反演圆与圆O_2正交。于是圆O_2经反演变换后不变。B,C互为反演点。 分别过B和C做AB的垂线L_B和L_C。易知圆O1和圆O经反演变换后分别为L_B和L_C。 如图作圆G'同时与圆O_2,L_B和L_C相切于E'和F'。 过E'F'作直线L,易证C在L上,并且∠E'CB为45°。 设L经过反演变换得到的圆为圆D',考虑圆D'的性质: 直线AD'与直线L垂直 圆D'经过A(因为L不经过A) 圆D'经过B(因为L经过C,而B,C互为反演点) 于是可知圆D就是圆D',因此E和E', F和F'分别互为反演点。 设圆G'经过反演变换为圆G''。因为圆G'与L_B和圆O_2相切于E'和F',所以圆G''与圆O_1和圆O_2相切于E和F。 所以G''即是EO_1和FO_2的交点,且圆G''半径是G''E。于是圆G即是圆G''。 因为圆G'与L_B,圆O_2,L_C都相切,所以圆G与三个给定圆都相切。证明完毕。 参考资料: Pappus chain

再度音乐寻宝

平时脑子里会无缘无故,不由自主地蹦出一些旋律。这些旋律很熟悉,也肯定不是自己现编的,但是就是想不起来具体的名字,歌手或者哪里听到的。 最简单的情况是记得歌词,或者可以哼唱检索。最难的大概是影视作品的配乐,我觉得成功的配乐会让人记得当时的“感觉”而不是曲子本身的细节。 继上次 音乐寻宝 之后,又一个旋律出现了,令我吃不香睡不着。 经过几天的查找,最终还是找到了,结果是井上昌己的《Up Side Down 永遠の環》,出自圣少女的ED。过程还是挺有趣的。 1. 我大概记得开头intro的旋律,以及歌词的整体节奏,类似词牌。然而试了若干哼唱检索,都没有结果。 2. 我大概记得一些歌词片段,于是去各种网站搜索。然而结果证明我记忆的片段是错误的。 3. 我“感觉”这是一个日本动画的ED, 于是去搜索了80 90年代引进的日本动画, 以及00-08年流行的日本动画的OP ED,然而没有找到。这个比较巧妙,因为圣少女国内引进过,但是节选了OP和ED。我其实也翻了日版动画,大概看了前几集和后几集的OP ED,万没想到结果是中间的。 4. 我“感觉”动画是跟魔法少女有关,所以翻了翻魔卡少女樱和Marybell的乐集,一无所获。当时其实也过了一遍圣少女的乐集,不知为何漏掉了。 5. 后来放宽了条件,搜了一些类型相似的动画乐集,虽然没找到当前这个,但是意外找到了我的女神里的《優しい心》。这个也是以前突然蹦出来的旋律。同时翻到了同作品里的《願い》,感觉跟要找的相似,然而其实没啥相似,除了都是欢快的曲子。 6. 于是放弃了,能试的都试了,只能随缘了。 7. 后来调整了下思维,想到有没有可能是其他类属性。于是翻了一下邓丽君的日文歌集,甚至《梅兰梅兰我爱你》,当然还是无果。 8. 最后真的是随了缘,重翻了一下圣少女的乐集,竟然找到了。 这个过程里我觉得最有趣的是两点: 一是我记忆里的“感觉”,日本动画, ED, 魔法少女。这样的记忆比曲子本身深刻一些。这也让找曲子更困难了一些。 二是我记忆里的不确定因素,包括旋律歌词。我试想过多种可能的乐器组合,以及歌词韵脚,感觉都有可能。最后也证明我这部分记忆都是不准确的。

Notes on Color #9: Color Calibration

In January, as part of the preparation for digital painting training, I calibrated my laptop display and my pen display. Yet in April I realized that images look quite different on my laptop, on the pen display, on my phone or on others' devices. After hours of research, trail and error, I managed to learn more principles and calibrated my hardware and software. Here are some notes: 1. Colorimeters are not spectrometers. Instead of measuring the full (visible) spectrum, the main goal is to simulate a standard observer (with three color receptors), or XYZ values. 2. Due to #1, there are assumptions made here and there to cut down the cost without hurting the quality too much. However an important aspect is the type of monitor (e.g. WLED, WLED+phosphor, GB LED,  RGB LED, OLED etc.).  The chracteristics of each type is diffrent, mostly on the "base spectrum". The calibration may look off if the wrong correction matrix is used. Note that old colorimeters might not support new...

Notes on Color #8: Idealized Gamut Mask

Continuing with the previous post , in this one I'll try to identify the goal of gamut mapping, and to create an idealized model.  The Color "Wheel" A quick word with color wheel before we can proceed. The color wheel arranges all paint (or device) colors (or more accurately, chromacity) in a hue-chroma system. The modern version is the uniform color system (UCS). I'll use CAM16UCS as an example. Here is the full visible gamut under D65, projected into CAM16UCS. "top view" of the D65 visible gamut in CAM16UCS. The color at (0, 0) is white. The colors have been mapped to sRGB. "Side view" of the D65 visible gamut in CAM16UCS. Note the chroma is 0 at the topmost and the bottom-most. The colors have been mapped to sRGB. Observe that the top view resembles the the color wheel, but it is nothing like a perfect circle. We could say this is our modern version of the color "wheel", which presents chromacity uniformly on a 2d plane. I also include...

Notes on Color #7: Revisiting James Gurney's Gamut Mask

Gamut masks, or gamut mapping, is a color managing tool made popular by James Gurney . It is a set of practical instructions, which allows us to easily create a palette of harmonic colors. James has explained the method in various formats: 2008 blog post 2011 series 1 , 2 , 3 Video  on Youtube. His book Color and Light: A Guide for the Realist Painter I found this method so inspiring when I first learned about it around 2014. Recently it came back to my mind when I started developing the digital Zorn palette , which turned out to work quite well . I decided to revisit the cool method, in the hope of getting better understanding the method and some color therories. The goal includes: Recognizing the limitation of physical paints. Figuring out an idealized model of the method. Adapting the method for digtal painting. The Original Method I'd summarize the original gamut mapping method as the following 3 steps: Start with a color wheel. Maskthe color wheel with a simple shape, typicall...