RE: Complete rework of parts and further questions
2024-12-19, 10:11 (This post was last modified: 2024-12-19, 10:13 by Manfred Schaefer.)
2024-12-19, 10:11 (This post was last modified: 2024-12-19, 10:13 by Manfred Schaefer.)
(2024-12-19, 6:41)Peter Blomberg Wrote: Hi Manfred,
All disc primitives are made of triangles even if they could have used quads. Theoretically, disc primitives could also have been composed of chords and a base triangle, but that is a moot point since the primitives have already been created as they are.
Prims are generally not modified after initial creation. In this particular case, 2-4disc might have preceded 1-4disc and would thus not have been available at the time 2-4disc was created.
Now that both prims exist, you should use the prim that suit your pattern the best. In general, use the largest prim that suits your need instead of many smaller. It is your choice to use one prim or another and you should not need to think what is inside of them. Do not inline prims if you can use them as they are.
Hello,
Thank you for your answers. Here is my new solution:
1 4 0 0 0 1 0 0 0 1 0 0 0 1 1-4disc.dat
1 4 0 0 0 -1 0 0 0 1 0 0 0 1 1-4disc.dat
I don't remember why there were too many 0's and a wrong primitive in the lines.
My thought was to compress the code as much as possible.
In this case, "1-4disc.dat" uses four lines of code and "2-4disc.dat" uses eight lines of code. Converting the triangles to quadrilaterals would cut the number of lines of code in half to almost two. By using two calls from "1-4disc.dat" to "2-4disc.dat", the number of lines of code is reduced to about a quarter.
I know that memory is no longer an issue these days, but I think it's wrong to completely rule out such considerations.
I don't know of any reason why triangles should not be replaced by squares. As far as I know, the rendering software can process them.
An argument against the use of primitives in primitives could be that recursive calls in the program could cause this, which could have an effect on memory management. I do not know, as I have not yet created any software for 3D rendering.
It is not my intention to inline primitives.
Regards
Manfred