Рельеф на основе математической функции

Oct 10, 2020 17:28 · 434 words · 3 minute read course zigzag picture cool

Hello friends, I am addressing all four my subscribers :) You are few, but I know that there are very cool dudes among you. In this video I will show you how to make a relief based on a math function. This is a very simple way to create relief, but with this method you can do quite complex and interesting things. The project sources will be on my github, and if you have any questions, ask them in the comments. To turn a function into a control program, we will use python, if anyone does not know, this is such a programming language.

00:33 - My machine is running LinuxCNC, and for it the python files are the same normal control program as the G-code. Nevertheless, to debug the code, I will run the program not from LinuxCNC, but directly, and it will already create the code that will go to the machine. The program also renders a picture so that you can roughly see what will happen. First, code is generated to cut sideways to create a base for subsequent horizontal advance. Then we zigzag the entire area and get the relief we need.

01:02 - Sometimes it is rational to cut not in a zigzag, but in a spiral, this is also quite easy to program, but this will be your homework :) There are more complex strategies for processing reliefs, but that’s another story. These are the functions that are currently available. Some of them I will choose and drink later. The chessboard is here just for beauty and to showcase what functions are. It will not work, since it has sharp corners, and the cutter that will cut the relief is rather thick. Basically, there are at least three ways to reproduce the relief with maximum accuracy. The first way is to take a cutter with a very small diameter tip, this will be quite accurate, but very long. The second way is to take a bit larger and take into account its dimensions in the program, it will be a little faster, but some details will still not be cut out, for example, sharp internal corners. It is most correct to combine the first and second methods, but there is also a third one - to ignore reliefs with small details, this will allow you to take a cutter larger and cut much faster. I’ll write down, perhaps, a function that imitates a wood drawing.

02:20 - The wood is, of course, simplified, so let’s call the picture “an ideal cylindrical tree dried in a deep vacuum”. .