This is a creation in Article, where the information may have evolved or changed. Posted on Wednesday, 2018-03-21 there are some exciting changes to this iteration. Especially I rewrite the whole program with Go. Actually I didn't spend much time in this piece. This brings the result is a little messy program, although so, I still spend a few been interfering introduction. First of all, I'll talk about the change in heraldry. In the most recent iteration, use only fess and pale (translator Note: The Professional terminology in heraldry, which identifies the vertical and horizontal patterns on the badge, [see Wiki] (Https://en.wikipedia.org/wiki/Pale_ (heraldry))), Then I added some of the rest of the basic elements: bend,bend sinister (jargon, [wiki] (Https://en.wikipedia.org/wiki/Bend_ (heraldry))), saltire (fork [wiki] (Https://en.wikipedia.org/wiki/Saltire)), and Chevron ([wiki interpretation] (Https://en.wikipedia.org/wiki/Chevron_ (insignia))) I have also added the most basic elements-these are called "ordinary" (professional nouns [wiki interpretation] (Https://en.wikipedia.org/wiki/Ordinary_ (heraldry))). Not all ordinary "ordinary" are included, and it looks a bit crooked. Because I created it manually and tried the bug fix, and I didn't do the exact calculation, there are a lot of problems that I need to solve. For example, there is a pair of patterns coming from the current iteration program. Notice if something's wrong with them?! [Image] (https://raw.githubusercontent.com/studygolang/gctt-images/master/heraldry-generation/01.jpg) Another problem is that many of the resulting designs have visual effects that are not very good. There is a good chance that an iteration will be made to improve the problem in the future. Having said so much, it has produced quite a few effects. Here are some examples:! [Image] (https://raw.githubusercontent.com/studygolang/gctt-images/master/heraldry-generation/02.jpg) Okay, now let's talk about Go. I've always wanted to rewrite this program with Go; I used PHP as a quickThe language of the molding. However, I have encountered obstacles and no more progress on development. The SVG library I am using does not support the features I need. I can unpack that library and deal with the original SVG XML, but it's a bit of a hassle. Then I found a good SVG Go package, a feature-rich, called svgo. It has several features that I need. Then I just made a simple change and took a morning's time to rewrite the entire code. The result is that the program is faster and easier to write, but that doesn't mean there's no problem. All the code is in a large file. The visual inline element is controlled by a chunk of ' switch ' or ' if '. There is no unit test (I have been in the pit several times). Now I'm going to add more complex symbols (like animals) and I can't put everything in one file. I want to solve this problem in the next iteration version.
via:https://www.benovermyer.com/post/heraldry-pt-2/
Author: Ben Overmyer Translator: Zhucheer proofreading: Rxcai
This article by GCTT original compilation, go language Chinese network honor launches
This article was originally translated by GCTT and the Go Language Chinese network. Also want to join the ranks of translators, for open source to do some of their own contribution? Welcome to join Gctt!
Translation work and translations are published only for the purpose of learning and communication, translation work in accordance with the provisions of the CC-BY-NC-SA agreement, if our work has violated your interests, please contact us promptly.
Welcome to the CC-BY-NC-SA agreement, please mark and keep the original/translation link and author/translator information in the text.
The article only represents the author's knowledge and views, if there are different points of view, please line up downstairs to spit groove
223 Reads