Research and design of Chinese cookie model with chun character based on OpenSCAD

Research Article
Open access

Research and design of Chinese cookie model with chun character based on OpenSCAD

Zhuohao Chen 1*
  • 1 Changsha University of Science and Technology    
  • *corresponding author 202008060808@stu.csust.edu.cn
Published on 23 October 2023 | https://doi.org/10.54254/2755-2721/16/20230858
ACE Vol.16
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-023-3
ISBN (Online): 978-1-83558-024-0

Abstract

In today’s society, the 3D modelling field has become an indispensable part of people’s lives. Whether it is the metaverse, games, industry, or medicine, 3D modelling cannot be separated from them. The models used in various fields are also diverse. In the models of various fields, there are not many models for reference in the food field’s biscuit modelling and there are no special views. This article creates a Chinese New Year biscuit with the Chinese handwritten character “Spring” on it based on the different styles and types of biscuit models in the food industry. OpenSCAD software was used to create this model. This article first introduces the methods and usage of OpenSCAD software that are encapsulated for modelling. Then this paper describes in detail how to layer and create biscuits layer by layer. How to use code to create a handwritten Chinese character and a cream biscuit completely in OpenSCAD is detailed by this article. For the result, this article implements a Chinese New Year biscuit with a reference to the “Spring” character written by the ancient Chinese calligrapher Yan Zhenqing. This work fully implements every stroke of handwritten Chinese characters in the cookie model, and these details have been recognized by the majority of people in the final evaluation.

Keywords:

3D modeling, Chinese new year biscuit, OpenSCAD, computer technology.

Chen,Z. (2023). Research and design of Chinese cookie model with chun character based on OpenSCAD. Applied and Computational Engineering,16,56-64.
Export citation

1. Introduction

In modern society, the status of computer graphics has gradually risen and has become an indispensable technology in many fields [1-3]. The main purpose of this paper is to study the most basic theories and methods of 3D modeling in computer graphics, and to satisfy the application needs of computer graphics in various fields in the most fundamental way [4]. This paper uses OpenSCAD as a tool for modeling, and studies how to create complex and delicate models from the most basic geometric shapes. The focus of this paper is on studying basic modeling methods. Unlike sculpting modeling in mainstream modeling software, OpenSCAD pays more attention to the fundamental theory of computer graphics and uses the most primitive modeling method for modeling.

Due to the large gap in modeling in the modern food field, and the gradual need for computer graphics intervention in the food field, this work was created to study how to create a more sophisticated cookie model [5]. This work uses many different modeling methods, but all methods are very low-level and basic. For example, creating a model can use logical operations of basic models or directly creating polygons. In addition, knowledge of geometry and discrete mathematics in mathematics is also applied in the modeling process [6]. When familiar with these methods, it will be easier to use advanced modeling software for sculpting modeling.

This article uses OpenSCAD to create a Chinese cookie with the Chinese handwritten character “spring”. This work realizes a complete handwritten Chinese character, and each stroke in the character is realized, which comprehensively applies various methods in OpenSCAD and creates secondary creation based on the basic methods provided by the software. This article hopes to provide some new ideas for food modeling field and provide some reference methods for users of OpenSCAD in creating Chinese handwritten characters [7].

2. The construction of the Chinese cookie

In order to maximize the use of OpenSCAD for modeling and to better reflect the Chinese cultural atmosphere, Opens CAD will be used to create a Chinese cookie with the handwritten Chinese character ‘Chun’ (spring). Modeling with OpenSCAD is different from using mainstream modeling software such as maya, blender, etc. [8-9]. OpenSCAD uses pure code for model creation, rendering and various mathematical calculations. OpenSCAD can use various built-in functions to achieve the creation of the target model, which requires some basic mathematical knowledge [10]. And in order for viewers to see all the features of a complete cookie, this work need to design a series of details related to cookies to make them closer to real Chinese cookies. Next, an introduction to the various tools of OpenSCAD will be given, and after introducing the tools, a detailed description of the various details of the cookie will be provided.

2.1. Software techniques

OpenSCAD provides users with a simple function interface that allows users to perform geometric transformations on basic geometric bodies to achieve their goals, such as intersection operations, union operations, etc. In addition, if users want to achieve more complex geometric bodies, they need to have a deeper understanding of the polyhedron function and the methods of linear extrusion and rotational extrusion in OpenSCAD. Among them, linear extrusion can realize special models such as helical cylinders and frustums, and rotational extrusion can realize geometric models similar to rings. With these complex methods, our model making will be more creative and can realize many geometric models.

Among the above methods, intersection and difference operations are most commonly used. On one hand, using intersection operation can obtain the overlapping parts of two or more models, which enables many models that are difficult to create directly, such as making the cone part of a cookie smooth. On the other hand, using difference operation can achieve cutting of models, which also gives users more imagination space and allows them to modify existing models and have more realistic ones, such as some operations can be used to create unique brush strokes in Chinese characters or some complex objects in reality.

OpenSCAD also provides many basic 3D shapes for users to use. Among the more commonly used are: spheres, cubes, and cylinders. Basically, all models are derived from logical operations on these basic models. Among them, polyhedrons are more special. Users can design corresponding sets of points and faces according to their own needs. OpenSCAD can draw corresponding polyhedrons based on the given points and faces. This also gives users more imagination space and is no longer limited to very few basic shapes.

In addition, OpenSCAD provides some conditional and iterative functions for users to avoid repetitive work and create more possibilities for model code editing. One of them is the for method for looping, which has three parameters: start, increment, end. The start parameter sets the initial value of the loop, the increment parameter sets the step size of each loop, that is, the value of start plus this value is used for comparison in each loop, and the end parameter sets the final value of the loop, that is, when the comparison value after this loop calculation is greater than end, the loop ends. The for-loop method perfectly solves the problem of repeated model generation in model making, avoids code redundancy and improves work efficiency. In OpenSCAD, various methods can be nested according to user needs to achieve more complex model effects.

2.2. The construction of the Chinese cookie

To achieve a realistic cookie main body, there needs to be a central block and several cookie cones. The cookie cones need to achieve a smoother effect and need to be based on tetrahedrons for corresponding operations to achieve a realistic cookie cone. In terms of handwritten characters, more complex model operations are required to achieve a handwritten character that can show the Chinese style of writing. The cookies THIS WORK designed are divided into three layers:

2.2.1. Cookie body layer. The body layer of the cookie is mainly to achieve the bottom layer of a cookie. Generally, the bottom layer of a cookie is composed of a circle or square, most of which are relatively simple shapes. Here, considering that using very simple shapes cannot achieve the effect of exercising the use of OpenSCAD, this work adopts the main body of a square cookie with several lace edges to create a cookie bottom design with lace edges (Figure 1). To make this cookie as realistic as possible, an appropriately sized cube and several smooth cookie cones need to be designed in a 3D scene. Many cookie cones arranged in a certain order around the main body of the cookie can achieve a lace effect.

/word/media/image1.png

Figure 1. Schematic diagram of the components of the cookie.

The main body of the cookie is a standard square, so the cube method in OpenSCAD can be used to create a standard cube for making the cookie body. The cube method has two parameters: size and center. The size parameter is used to set the length of the cube in the x, y, and z dimensions. The center is a Boolean variable. If it is true, the cube is in the center of the coordinate axis; otherwise, the cube will be generated in the first quadrant of the coordinate axis. After using the cube method, an ideal cube can be obtained (Figure 2).

/word/media/image2.png

Figure 2. Schematic diagram of the components of the cookie.

In order to achieve a relatively smooth triangular pyramid and avoid the cumbersome operation of starting to cut directly from a cube, the polyhedron method included in OpenSCAD was used directly here. This method has two parameters: points for determining the number of points of the polyhedron and faces for storing the vector set that makes up each face of the polyhedron. The polyhedron method can initially achieve a standard tetrahedron (Figure 3). Afterwards, corresponding cuts need to be made on this tetrahedron to make it smoother, and a smoother effect is closer to reality. In this work, tetrahedrons are used with multiple spheres and cylinders to take intersections from different angles to make the edges and corners of tetrahedrons smoother, and finally achieve a lifelike cookie cone (Figure 3).

/word/media/image3.png

Figure 3. Cookie cone.

2.2.2. Middle layer. The design of the middle layer is mainly a decorative cream layer. To make the overall appearance of the cookie more coordinated, the middle layer uses a rounded cube. In general modeling thinking, we use four cylinders to perform logical operations with a cube to achieve a rounded cube. This often makes the rounded cube asymmetrical. However, in OpenSCAD, the author provides users with a method to achieve simple rounded corners, and that method is minkowski. This method can achieve a simple inverted rounded corner effect, provided that a cube and a cylinder are provided, and their positions are as shown in the figure below(Figure 4).

/word/media/image4.png

Figure 4. The cube and the cylinder.

Afterward, this method was used to obtain a beautiful, filleted cube (Figure 5). To better reflect the atmosphere of the Chinese Spring Festival, the color method was used to render the middle layer red. This method is like most modeling software and can render the desired color using r, g, b, a value. In this work, this method was used to render a unique red color for the Chinese Spring Festival. Ultimately, an ideal red filleted cube was achieved.

/word/media/image5.png

Figure 5. Rounded cube.

2.2.3. Handwritten character layer. The design inspiration of this layer mainly comes from the “Spring” character written by Yan Zhenqing, an ancient Chinese calligrapher. This handwritten Chinese character is very consistent with the aesthetic and brush writing habits of Chinese people, and belongs to regular script in Chinese calligraphy (Figure6).

/word/media/image6.png

Figure 6. The “Spring” character written by Yan Zhenqing.

This character has many strokes, which makes it difficult to reproduce a simulated 3d model in OpenSCAD. In order to make the production sequence of the Chinese handwritten “Spring” character model more organized and the production logic clearer, this character is divided into four main strokes: horizontal, vertical, left-falling and right-falling. Each stroke has different thickness requirements, and each stroke has its unique stroke and stroke method. This work gradually realizes each detail and makes this Chinese character look as real as possible.

First is the “horizontal” stroke. By observing it, viewers can find that the structure of this stroke gradually becomes thinner from left to right, and there is a protruding part at the far left. This work considers that this Chinese character is part of a Chinese cookie, so it makes it as three-dimensional as possible. The main body of this “horizontal” stroke uses a gradually thinning cylinder, which is obtained by linear extrusion in OpenSCAD. A slanted cylinder is used for the pen tip part on the far left (Figure 7), which is rotated and displaced appropriately before being combined with the previous cylinder to achieve a more realistic “horizontal” (Figure 7).

/word/media/image7.png

Figure 7. The “Heng” stroke.

After implementing the first “horizontal”, all the other “horizontals” in the middle of this character can be obtained by making small displacements or size changes to the first “horizontal”. The pen tip part on the far right of the two “horizontals” in the middle also uses the same processing method as the pen tip on the far left of the first “horizontal”.

The second stroke is a “pie”. This stroke can be seen from Yan Zhenqing’s characters. Its structure gradually becomes thinner from the top to the lower left and has a certain curvature. In this work, in order to achieve a more realistic handwritten “left-falling” stroke, the inclination angle of this stroke needs to be relatively gentle in the upper half and have a larger arc in the lower half. Therefore, this stroke was divided into two parts for production. In the upper part, a part of the ring was used to achieve a curvature that was closer to the real character. In the lower part, a cone-like object with a specific size was first obtained using linear extrusion, and then an effect with a smaller curvature that gradually becomes thinner was obtained by intersecting it with a cylinder of a specific size (Figure 8).

/word/media/image8.png

Figure 8. The cone-like object and the cylinder.

Here, by adjusting the position and angle of the two parts, these two parts are spliced together to finally achieve a 3D stroke “pie” with a curvature and shape that is like real Chinese characters (Figure 9).

/word/media/image9.png

Figure 9. The “Pie” stroke.

The third stroke is “na”. The structure of this stroke is quite special. Both the upper and lower sides are flat and gradually become thicker from top to bottom right. Here, a method similar to the implementation of the “pie” stroke was used. A frustum was made using linear extrusion and its thickness was adjusted. Then, two cylinders with adjusted sizes and angles were used to perform more complex logical operations with it to obtain a model that is similar to the real stroke (Figure 10).

/word/media/image10.png style='height:29.4pt;width:77pt;v-text-anchor:middle;' />/word/media/image11.png

Figure 10. The “Na” stroke.

The last stroke is vertical. By observing, it can be found that the “vertical” stroke is similar to the “horizontal” stroke. Therefore, it is transformed accordingly based on the “horizontal” stroke as a basis. Finally, two ideal “vertical” strokes were obtained using a method similar to the previous method (Figure 11).

/word/media/image12.png

Figure 11. The “Shu” stroke.

After combining the four main strokes mentioned above, the position and angle of each stroke were set accordingly, and the size of each stroke was adjusted. Then, a 3D model that is very similar to Yan Zhenqing’s handwritten “spring” character can be obtained. This model is the main body of the text layer at the top of Chinese cookies (Figure 12).

/word/media/image13.png

Figure 12. The 3D model of “Chun” character.

After stacking the above three layers of models, a Chinese New Year cookie full of Chinese culture can be obtained (Figure 13). The main body of this cookie is a lace pancake, with a cream layer on the top for decoration. On the top layer, there is a handwritten “spring” character that conforms to Chinese calligraphy culture. The whole cookie is relatively coordinated and was completed in OpenSCAD.

/word/media/image14.png

Figure 13. The Chinese cookie model with “Chun” Character.

3. Result

To evaluate the spring character model constructed in this paper, an evaluation was conducted from the aspects of appearance, details, color, etc. as shown in Table 1. In table 1, 50 people rated the appearance, characteristics, details and color of this cookie with the Chinese handwritten character “Spring”. The results showed that nearly half of the people gave a score of more than 90 for the appearance, 90% of the people gave a high score of more than 90 for the characteristics, and more than 70% of the people gave a high evaluation for the details. However, less than 50% of the people gave a high score for color. The result was obtained by using OpenSCAD to depict the details of the entire cookie. Each cookie cone in the cookie is relatively smooth and sufficient details are considered in the construction process of the handwritten character “Spring” to reflect Chinese culture. The entire “Spring” character is very consistent with the aesthetic taste of Chinese people and conforms to the writing habits of Chinese handwritten characters. Specifically, the design and production of each stroke are based on Chinese culture, and each stroke angle, thickness and position have been finely adjusted. In addition, the roundness and tilt angle at each stroke are strictly based on ancient Chinese calligraphers’ characters. In creating the cookie cone, various common cookies were compared to create a smooth and partially sharp cookie cone that looks more like a real cookie.

However, less than 50% of the people gave a high score for color. Regarding this result, a detailed analysis of the model’s color was carried out, and it was found that there were some defects in the cookie model containing the Chinese handwritten character “spring” made using OpenSCAD. First of all, in the middle layer of the cookie, a rounded cube was achieved using OpenSCAD’s built-in method, but for real cream, there were still some wrinkles missing and unevenness after applying cream by hand, which also resulted in some differences between the model and the real cookie cream. In addition, due to the limitations of OpenSCAD software, there is not much room for creativity in terms of color, but this can be fixed by importing modeling software that optimizes color more in post-production.

Table 1. Investigating chart of model.

Score

Appearance

Feature

Detail

Color

>=90

33

45

38

21

80~90

12

5

10

20

<=80

5

0

2

9

In summary, although there are some defects in the Chinese New Year biscuits made here, there are still a large number of people who like it and give it a score of over 90 for its various aspects. If OpenSCAD continues to develop more functions and we invest more time, according to the experience of this article, we can definitely make the Chinese biscuits more refined, beautiful and closer to reality.

4. Conclusion

In summary, this article uses various tools in OpenSCAD to create a Chinese calligraphy character “Spring” on a Spring Festival biscuit model. The biscuit is divided into three layers and the details are gradually constructed to finally synthesize a biscuit with a strong Chinese cultural flavor. This work splits complex models into parts and then constructs each part using various basic models. Finally, each part is combined into the final model. This production mode makes model production more systematic and efficient. The details of the biscuit were continuously improved to make it more realistic, and finally achieved the creation of a Chinese Spring Festival biscuit that completely uses OpenSCAD to create handwritten Chinese characters with many strokes and integrates them into each layer of the biscuit. The article’s “Spring” Chinese character can inspire and offer new ideas for creating models of Chinese handwritten characters.


References

[1]. Kato, Hiroharu, et al. Differentiable rendering: A survey. 2020, arXiv preprint arXiv:2006.12057.

[2]. Tang, Yuk Ming, and Ho Lun Ho. 3D modeling and computer graphics in virtual reality. Mixed Reality and Three-Dimensional Computer Graphics. 2020, IntechOpen, 1-10.

[3]. García-León, Josefina, et al. Interactive dissemination of the 3D model of a baroque altarpiece: a pipeline from digital survey to game engines. 2019, Information Technology 8.2: 59-76.

[4]. Liu, C., & Li, L. Study on the basic theory and method of 3D modeling in computer graphics. 2019, J. Physics: Conf. Series, 1235(1), 012054.

[5]. Saguy, and I. Sam. Challenges and opportunities in food engineering: Modeling, virtualization, open innovation and social responsibility. 2016, J. Food Engineer.2 1-9.

[6]. Chen, Y., & Chen, H. Discrete mathematics and its application in computer graphics. 2020, Adv. Mathemat. 9.2: 201-216.

[7]. H. Hu, Y. Yu, and L. Yang, Study on 3D Modeling Method of Chinese Calligraphy Character Based on Computer Graphics, 2018, Inter. Conf. Graphic and Image Process., 325-328.

[8]. King, R. Using the New(er) Sculpting Toolset in Maya in a Polygon Modeling Workflow. 2019 J. Physics, 138-145.

[9]. Guevarra, Ezra Thess Mendoza. Modeling and Animation Using Blender: Blender 2.80: The Rise of Eevee. 2019 A Press.1-10.

[10]. Trenchev, Ivan, et al. Mathematical approaches for creation of complex 3D models and their application in education, 2019. Inter. Conf. Edu., Res. Innova.43 (86).


Cite this article

Chen,Z. (2023). Research and design of Chinese cookie model with chun character based on OpenSCAD. Applied and Computational Engineering,16,56-64.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 5th International Conference on Computing and Data Science

ISBN:978-1-83558-023-3(Print) / 978-1-83558-024-0(Online)
Editor:Marwan Omar, Roman Bauer, Alan Wang
Conference website: https://2023.confcds.org/
Conference date: 14 July 2023
Series: Applied and Computational Engineering
Volume number: Vol.16
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Kato, Hiroharu, et al. Differentiable rendering: A survey. 2020, arXiv preprint arXiv:2006.12057.

[2]. Tang, Yuk Ming, and Ho Lun Ho. 3D modeling and computer graphics in virtual reality. Mixed Reality and Three-Dimensional Computer Graphics. 2020, IntechOpen, 1-10.

[3]. García-León, Josefina, et al. Interactive dissemination of the 3D model of a baroque altarpiece: a pipeline from digital survey to game engines. 2019, Information Technology 8.2: 59-76.

[4]. Liu, C., & Li, L. Study on the basic theory and method of 3D modeling in computer graphics. 2019, J. Physics: Conf. Series, 1235(1), 012054.

[5]. Saguy, and I. Sam. Challenges and opportunities in food engineering: Modeling, virtualization, open innovation and social responsibility. 2016, J. Food Engineer.2 1-9.

[6]. Chen, Y., & Chen, H. Discrete mathematics and its application in computer graphics. 2020, Adv. Mathemat. 9.2: 201-216.

[7]. H. Hu, Y. Yu, and L. Yang, Study on 3D Modeling Method of Chinese Calligraphy Character Based on Computer Graphics, 2018, Inter. Conf. Graphic and Image Process., 325-328.

[8]. King, R. Using the New(er) Sculpting Toolset in Maya in a Polygon Modeling Workflow. 2019 J. Physics, 138-145.

[9]. Guevarra, Ezra Thess Mendoza. Modeling and Animation Using Blender: Blender 2.80: The Rise of Eevee. 2019 A Press.1-10.

[10]. Trenchev, Ivan, et al. Mathematical approaches for creation of complex 3D models and their application in education, 2019. Inter. Conf. Edu., Res. Innova.43 (86).