POV-Ray : Newsgroups : povray.newusers : Round box : Re: Round box Server Time21 Jun 2024 17:49:12 EDT (-0400)
 Re: Round box
 From: Tor Olav Kristensen Date: 4 Jan 2022 15:15:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.61d4a9b8b1626a3251748ca189db30a9%40news.povray.org",
"dateCreated": "2022-01-04T20:15:00+00:00",
"datePublished": "2022-01-04T20:15:00+00:00",
"author": {
"@type": "Person",
"name": "Tor Olav Kristensen"
}
}
> Ive been trying to use the round_box shape but i dont really understand how to.
> If someone is willing to explain the way the shapes and the "macro?" idrk what
> it is, id appreciate it a lot.

I suggest that you read these pages:

"HowTo:Use macros and loops"
https://wiki.povray.org/content/HowTo:Use_macros_and_loops

"Reference:Shapes.inc"
https://wiki.povray.org/content/Reference:Shapes.inc

"2.2.2.8 User Defined Macros"
https://www.povray.org/documentation/view/3.7.0/243/

"2.7.12.1 shapes.inc"
http://www.povray.org/documentation/view/3.7.1/468/

- and then you can try this:

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.7;

global_settings { assumed_gamma 1.0 }

#include "colors.inc"
#include "shapes.inc" // For the Round_Box() macro

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#declare pA = <-2,  0, -1>;  // A corner
#declare pB = <+2, +1, +1>;  // The opposite corner
#declare UseMerge = false;

object {
texture {
pigment { color DarkSlateBlue }
normal {
sine_wave
frequency 30
scale 0.25*<1, 1, 1>
}
finish { phong 0.5 }
}
rotate -35*y
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

background { color Gray30 + Cyan/5 }

light_source {
100*<-5, 20, -10>
color White
}

camera {
location <0, 3, -5>
look_at <0, 0, 0>
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

--
Tor Olav
```