I spent a little while fiddling numbers in my head trying to make better pach circles, and I came up with this:
If you have a circle of radius ‘n’, centered at (0, 0), and a line extending from the origin at 45 degrees, they cross at n * sin(45) (or sqrt(2 * n * n)).
So, I set about finding a radius where this was roughly an integer, and the smallest I found turned out to be seven, where the 45 degrees point is at almost exactly (5, 5).
So, you create a 5x3 patch, and vertex edit it so it looks like this (taking up 7 x 7 grid squares):
- • -
•
-
Then move the corner vertex 2 squares down and two left, and finally line up the control points so that they are on a 45 degree diagonal to the middle control point, thus:
• -
_
•
-
This can be expanded to complete cylinders or discs, and 1/8ths of cylinders are also possible with it. It is much more circular than a standard bezier, as you can check if you make one into a func_rotating.
I also made some sphere parts this way, but they’re too complicated to be worth describing, so here’s the XML:
<?xml version="1.0"?>
<!DOCTYPE mapq3 SYSTEM "mapq3.dtd">
<mapq3>
<entity>
<epair key="classname" value="worldspawn"/>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="9" height="9">384 64 120 0 1 384 40 120 0 0 384 24 104 0 -1 384 8 88 0 -2 384 8 64 0 -3 384 8 40 0 -4 384 24 24 0 -5 384 40 8 0 -6 384 64 8 0 -7 384 64 120 1 1 376 40 120 1 0 368 24 104 1 -1 360 8 88 1 -2 360 8 64 1 -3 360 8 40 1 -4 368 24 24 1 -5 376 40 8 1 -6 384 64 8 1 -7 384 64 120 2 1 368 48 120 2 0 356 36 104 2 -1 344 24 88 2 -2 344 24 64 2 -3 344 24 40 2 -4 356 36 24 2 -5 368 48 8 2 -6 384 64 8 2 -7 384 64 120 3 1 360 56 120 3 0 344 48 104 3 -1 328 40 88 3 -2 328 40 64 3 -3 328 40 40 3 -4 344 48 24 3 -5 360 56 8 3 -6 384 64 8 3 -7 384 64 120 4 1 360 64 120 4 0 344 64 104 4 -1 328 64 88 4 -2 328 64 64 4 -3 328 64 40 4 -4 344 64 24 4 -5 360 64 8 4 -6 384 64 8 4 -7 384 64 120 5 1 360 72 120 5 0 344 80 104 5 -1 328 88 88 5 -2 328 88 64 5 -3 328 88 40 5 -4 344 80 24 5 -5 360 72 8 5 -6 384 64 8 5 -7 384 64 120 6 1 368 80 120 6 0 356 92 104 6 -1 344 104 88 6 -2 344 104 64 6 -3 344 104 40 6 -4 356 92 24 6 -5 368 80 8 6 -6 384 64 8 6 -7 384 64 120 7 1 376 88 120 7 0 368 104 104 7 -1 360 120 88 7 -2 360 120 64 7 -3 360 120 40 7 -4 368 104 24 7 -5 376 88 8 7 -6 384 64 8 7 -7 384 64 120 8 1 384 88 120 8 0 384 104 104 8 -1 384 120 88 8 -2 384 120 64 8 -3 384 120 40 8 -4 384 104 24 8 -5 384 88 8 8 -6 384 64 8 8 -7</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="5" height="9">256 64 120 0 1 256 40 120 0 0 256 24 104 0 -1 256 8 88 0 -2 256 8 64 0 -3 256 8 40 0 -4 256 24 24 0 -5 256 40 8 0 -6 256 64 8 0 -7 256 64 120 1 1 248 40 120 1 0 240 24 104 1 -1 232 8 88 1 -2 232 8 64 1 -3 232 8 40 1 -4 240 24 24 1 -5 248 40 8 1 -6 256 64 8 1 -7 256 64 120 2 1 240 48 120 2 0 228 36 104 2 -1 216 24 88 2 -2 216 24 64 2 -3 216 24 40 2 -4 228 36 24 2 -5 240 48 8 2 -6 256 64 8 2 -7 256 64 120 3 1 232 56 120 3 0 216 48 104 3 -1 200 40 88 3 -2 200 40 64 3 -3 200 40 40 3 -4 216 48 24 3 -5 232 56 8 3 -6 256 64 8 3 -7 256 64 120 4 1 232 64 120 4 0 216 64 104 4 -1 200 64 88 4 -2 200 64 64 4 -3 200 64 40 4 -4 216 64 24 4 -5 232 64 8 4 -6 256 64 8 4 -7</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="9" height="5">320 64 120 0 1 320 40 120 0 0 320 24 104 0 -1 320 8 88 0 -2 320 8 64 0 -3 320 64 120 1 1 312 40 120 1 0 304 24 104 1 -1 296 8 88 1 -2 296 8 64 1 -3 320 64 120 2 1 304 48 120 2 0 292 36 104 2 -1 280 24 88 2 -2 280 24 64 2 -3 320 64 120 3 1 296 56 120 3 0 280 48 104 3 -1 264 40 88 3 -2 264 40 64 3 -3 320 64 120 4 1 296 64 120 4 0 280 64 104 4 -1 264 64 88 4 -2 264 64 64 4 -3 320 64 120 5 1 296 72 120 5 0 280 80 104 5 -1 264 88 88 5 -2 264 88 64 5 -3 320 64 120 6 1 304 80 120 6 0 292 92 104 6 -1 280 104 88 6 -2 280 104 64 6 -3 320 64 120 7 1 312 88 120 7 0 304 104 104 7 -1 296 120 88 7 -2 296 120 64 7 -3 320 64 120 8 1 320 88 120 8 0 320 104 104 8 -1 320 120 88 8 -2 320 120 64 8 -3</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="5" height="5">192 64 120 0 1 192 40 120 0 0 192 24 104 0 -1 192 8 88 0 -2 192 8 64 0 -3 192 64 120 1 1 184 40 120 1 0 176 24 104 1 -1 168 8 88 1 -2 168 8 64 1 -3 192 64 120 2 1 176 48 120 2 0 164 36 104 2 -1 152 24 88 2 -2 152 24 64 2 -3 192 64 120 3 1 168 56 120 3 0 152 48 104 3 -1 136 40 88 3 -2 136 40 64 3 -3 192 64 120 4 1 168 64 120 4 0 152 64 104 4 -1 136 64 88 4 -2 136 64 64 4 -3</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="3" height="3">100 36 104 0 1 112 48 120 0 0 128 64 120 0 -1 112 24 104 1 1 120 40 120 1 0 128 64 120 1 -1 128 24 104 2 1 128 40 120 2 0 128 64 120 2 -1</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="3" height="3">88 24 64 0 1 88 24 92 0 0 100 36 104 0 -1 104 8 64 1 1 104 8 92 1 0 112 24 104 1 -1 128 8 64 2 1 128 8 92 2 0 128 24 104 2 -1</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="5" height="3">8 64 64 0 1 8 64 88 0 0 24 64 104 0 -1 8 40 64 1 1 8 40 88 1 0 24 48 104 1 -1 24 24 64 2 1 24 24 88 2 0 36 36 104 2 -1 40 8 64 3 1 40 8 88 3 0 48 24 104 3 -1 64 8 64 4 1 64 8 88 4 0 64 24 104 4 -1</matrix>
</patch>
<patch>
<shader>textures/radiant/notex</shader>
<matrix width="5" height="3">24 64 104 0 1 40 64 120 0 0 64 64 120 0 -1 24 48 104 1 1 40 56 120 1 0 64 64 120 1 -1 36 36 104 2 1 48 48 120 2 0 64 64 120 2 -1 48 24 104 3 1 56 40 120 3 0 64 64 120 3 -1 64 24 104 4 1 64 40 120 4 0 64 64 120 4 -1</matrix>
</patch>
</entity>
</mapq3>
Copy that into a text editor, save it as ‘something.xmap’, and import it as a prefab into a map.
[/blatant-showing-off] :fiesta:




