mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#declare

0 posts0 participants0 posts today

President-elect Donald Trump has vowed to declare a national energy emergency as soon as he takes office Monday, months after promising voters that he would cut their electric and gasoline prices in half in the first year of his administration. "To...CHECK THE FULL ARTICLE BELOW👇
#BreakingNewsMarkets #BreakingNewsPolitics #Business #businessnews #declare #donaldtrump #emergency #energy #Environment #Featured

skylinenews.org/how-trump-coul

Replied in thread

@tth Ok, je me lance...

Un petit truc sympa avec #povray et ce qu'on peut faire avec la directive #macro :

#declare Rng1 = seed(1337);
#macro Bubble ()
sphere {
	0, 0.10
	#if ( rand(Rng1) < 0.5 )	pigment { color Cyan }
	#else				pigment { color Magenta }
	#end
	}
#end
#macro Un_Machin ()
union	{
	#for (Y, -8, 8, 2)
	    object { Bubble() translate y*Y*0.1 }
	#end
	}
#end
#declare Les_Machins = object
{
union	{
	#for (X, -7, 7)
	    object { Un_Machin() translate x*X*0.6 }
	#end
	}
}
object { Les_Machins }

https://git.tetalab.org/tTh/HexaCone/commit/2ed567a33ca481a08b20384321b94ce1c121bbf0

𝙇𝙪𝙘𝙮 𝘽𝙪𝙗𝙗𝙡𝙚, by Rob McGregor, 2012

𝘏𝘦𝘳𝘦'𝘴 𝘢 𝘣𝘶𝘣𝘣𝘭𝘦 𝘮𝘢𝘵𝘦𝘳𝘪𝘢𝘭 𝘤𝘰𝘥𝘦:

#𝚍𝚎𝚌𝚕𝚊𝚛𝚎 𝙼_𝙱𝚞𝚋𝚋𝚕𝚎 = 𝚖𝚊𝚝𝚎𝚛𝚒𝚊𝚕 {
𝚝𝚎𝚡𝚝𝚞𝚛𝚎 {
𝚙𝚒𝚐𝚖𝚎𝚗𝚝 { 𝚛𝚐𝚋𝚝 𝟶.𝟿𝟿 }
𝚏𝚒𝚗𝚒𝚜𝚑 {
𝚍𝚒𝚏𝚏𝚞𝚜𝚎 𝟶
𝚛𝚎𝚏𝚕𝚎𝚌𝚝𝚒𝚘𝚗 { 𝟶.𝟶𝟻, 𝟷 𝚏𝚛𝚎𝚜𝚗𝚎𝚕 𝚘𝚗 }
𝚜𝚙𝚎𝚌𝚞𝚕𝚊𝚛 𝟶.𝟿𝟿 𝚛𝚘𝚞𝚐𝚑𝚗𝚎𝚜𝚜 𝟶.𝟶𝟶𝟷
𝚌𝚘𝚗𝚜𝚎𝚛𝚟𝚎_𝚎𝚗𝚎𝚛𝚐𝚢
𝚒𝚛𝚒𝚍 { 𝟶.𝟸𝟻
𝚝𝚑𝚒𝚌𝚔𝚗𝚎𝚜𝚜 𝟶.𝟸𝟻
𝚝𝚞𝚛𝚋𝚞𝚕𝚎𝚗𝚌𝚎 𝟷.𝟸
}
}
}
𝚒𝚗𝚝𝚎𝚛𝚒𝚘𝚛 { 𝚒𝚘𝚛 𝟷.𝟶𝟶𝟷 }
}

#ポヴエイブル
#ポヴレイ
#POVaBle
#Art
#DigitalArt
#Creative
#3dart
#cgi
#ConceptArt
#render
#POVRay

Today, we build off of the 𝓉𝑒𝓇𝓂𝒾𝓃𝒶𝓁 𝓋𝑒𝓁𝑜𝒸𝒾𝓉𝓎 in the previous Drop and focus on leveling up the safety, resilience, and utility of our humble (and very likely way too populated) shell environments.

Drop #216 (2023-03-09)

EPA (Environment Protection & Agency)

#declare/#readonly; write safer scripts & communicate intent to your future self and team
#direnv/#quickenv;per-dir/project environments (Golang)
#autoenv; slightly different take on ^^ in Rust

Read/sub: dailyfinds.hrbrmstr.dev/p/drop

hrbrmstr's Daily DropDrop #216 (2023-03-09): EPA (Environment Protection & Agency)By boB Rudis
@Maira_Nekomori /raytrace @@begin

global_settings { assumed_gamma 2.2 }

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "glass.inc"
#include "consts.inc" // Index of refraction constants

camera {
location <0.0, 2, -10>
direction <0.0, 0.0, 1>
angle 40
up <0.0, 1.0, 0.0>
right <4/3, 0.0, 0.0>
look_at <0, 0, 0>
}

light_source { <30, 50, -50> color White }

light_source { <-30, 10, 20> color Gray50 }

fog { color Gray50 distance 200 } // This fog reaches max density at 200z

// Background sphere
sphere { <0, 0, 0>, 1
hollow on
finish { crand 0.015 }
pigment {
gradient y
color_map {
[0.0 1.0 color Gray80 color Gray30]
}
scale 10000
}
}

// A lens. This uses the Ellipsoid quadric to make it independantly
// scalable, but it would be faster to use spheres.
// It is designed "sideways" so you can see the thickness.
// It is then rotated 90o on Y so the viewer is looking through the lens.
#declare Lens_Thickness = 0.35;
#declare Lens_Diameter = 1.5;

#declare Lens =
intersection {
sphere { <0, 0, 0>, 1.5 translate <0.75, 0, 0> }
sphere { <0, 0, 0>, 1.5 translate <-0.75, 0, 0> }

interior{ior Flint_Glass_Ior}
texture {
T_Glass3
finish {
reflection 0 // Over-ride reflection
}
}

scale <Lens_Thickness, Lens_Diameter, Lens_Diameter>
}


plane { y, -4
pigment {
checker color HuntersGreen color SummerSky
scale <3, 1, 3>
}
finish {
ambient 0.2
diffuse 0.6
}
}

object { Lens rotate 80*y }

// A sphere in the distance
sphere { <3, 1, 30>, 2 finish {Phong_Shiny} pigment {Orange} }

object { Cylinder_X
finish {
Phong_Shiny
ambient 0.25
diffuse 0.6
}
pigment {
granite
scale 2
}

rotate -75*y
translate <0 ,-3, 25>
}


@@end
@Maira_Nekomori Now a 3D chart! /raytrace
@@begin

#include "colors.inc"
#include "textures.inc"
#include "stones.inc"

#declare sky_flag = 1;
#declare star_flag = 1;
#declare arrow_flag = 1;
#declare mkernel_flag = 1;
#declare explosion_flag = 1;
#declare components_flag = 1;
#declare myfont = "timrom.ttf";

camera {
location <-3*1.1,-5*1.1,-8*1.1>
look_at <-0.30,-0.6,0>
}

light_source {
<-2,-5,-5>
color rgb <1,1,1>
}

light_source {
<6,10,-9>
color rgb <1,1,1>
}

#if (explosion_flag)

#declare R1 = seed(12345);
#declare Explosion = object {
merge {
#declare num = 0;
#declare max_num = 40;
#while (num<max_num)
sphere { 0, 1
pigment { color rgbt <1, 1, 1, 1> }
finish {
ambient 0
diffuse 0
}
interior {
media {
emission 1.5
intervals 1
samples 5
method 3
density {
spherical
ramp_wave
turbulence 1
color_map {
[ 0.0 color rgbt <1, 0, 0, 1> ]
[ 0.5 color rgbt <1, 1, 0.5, 0> ]
[ 1.0 color rgbt <1, 1, 1, 0> ]
}
}
}
}
hollow
#declare halo_ypos = rand(R1)/2;
#declare halo_size = 2/(2+halo_ypos*40);
scale halo_size
scale <1,rand(R1)/4 + 0.75,1>
scale 0.5
rotate <0,0,rand(R1)*360>
translate <rand(R1)*(halo_size+0.2), - rand(R1)*(halo_size+0.2) - halo_ypos*2, num/100>
}
#declare num = num + 1;
#end
}
}

object { Explosion scale 0.7 rotate <45,0,0> translate <4.2,0,-0.54> rotate <0,0,4*60+30>}
object { Explosion scale 0.7 rotate <45,0,0> translate <3.6,0,-0.54> rotate <0,0,3*60+40>}

#end /* explosion */


#if (star_flag)
difference {
merge {
difference {
cylinder {
<0, 0, -0.5>, <0, 0, 0.5>, 2
}
#declare alp = 0;
#while (alp < 360)
cylinder {
<2.2, 0, -0.6>, <2.2, 0, 0.6>, (4*3.14159 + 3.6)/16
rotate <0,0,alp>
}
#declare alp = alp + 60;
#end
} /* difference */
#declare alp = 30;
#while (alp < 360)
difference {
merge {
box {
<0.5,-0.1,-0.8>,<2.05,0.1,0.8>
}
box {
<2.05,-0.1,-0.8>,<6,0.1,0.8>
pigment { color rgb <0.4,0.4,0.4> }
}
#declare b_y = -0.85;
#while (b_y < 0.8)
#declare b_x = 1.8;
#while (b_x < 6.5)
box {
<b_x,-0.15,b_y>,<b_x+0.45,0.15,b_y+0.21>
}
box {
<b_x+0.25,-0.15,b_y+0.3>,<b_x+0.25+0.45,0.15,b_y+0.3+0.21>
}
#declare b_x = b_x + 0.5;
#end
#declare b_y = b_y + 0.6;
#end
texture {
T_Stone24
scale 2
finish {ambient 0.65 reflection 0}
}
} /* merge */
box {
<5.5,-5,-5>,<10,5,5>
}
rotate <0,0,alp>
} /* difference */
#declare alp = alp + 60;
#end
} /* merge */
sphere {
<0,0,0>, 1.3 scale <1,1,0.7>
}
sphere {
<0,0,-5> 4.5
}
texture {
T_Stone24
scale 2
finish { ambient 0.65 reflection 0 }
}
}
#end /* star */


#if (mkernel_flag)

sphere {
<0,0,0>, 1.3 scale <1,1,0.7>
texture{
Polished_Chrome
pigment{color rgbt <0.7,0.4,0,0.5>}
finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0}
}
}

text {
ttf myfont "Micro-" 0, 0
pigment { color rgb <1,1,0.9> }
scale 0.6
translate <-0.75,0.1,-0.2>
finish {ambient 1.4}
}
text {
ttf myfont "kernel" 0, 0
pigment { color rgb <1,1,0.9> }
scale 0.6
translate <-0.75,-0.5,-0.2>
finish {ambient 1.4}
}

#end /* mkernel */


#if (arrow_flag)

#declare sca = 3.1415/180;
#declare alp = 4*60*sca;
#declare bet = 3*60*sca;

/* arrow through kernel */
difference {
merge {
sphere_sweep {
b_spline
5,
<7*cos(alp),7*sin(alp),0>,0.1,
<3*cos(alp),3*sin(alp),0>,0.1,
<0,0,0>,0.1,
<2*cos(bet),2*sin(bet),0>,0.1,
<4*cos(bet),4*sin(bet),0>,0.1
}
cone {
<2*cos(bet),2*sin(bet),0>,0.2,
<2.5*cos(bet),2.5*sin(bet),0>,0
}
}
box {<-5,-5,0.01>, <5,5,5>}
box {<-5,-5,-0.01>, <5,5,-5>}
pigment {color rgb <0.5,0.6,0.5>}
finish {ambient 0.5}
}
merge {
sphere_sweep {
b_spline
5,
<7*cos(alp),7*sin(alp),0>,0.02,
<3*cos(alp),3*sin(alp),0>,0.02,
<0,0,0>,0.02,
<2*cos(bet),2*sin(bet),0>,0.02,
<4*cos(bet),4*sin(bet),0>,0.02
}
cone {
<2*cos(bet),2*sin(bet),0>,0.05,
<2.4*cos(bet),2.4*sin(bet),0>,0
}
pigment {color rgb <0.7,1,0.7>}
finish {ambient 1}
}

/* arrows to walls */
intersection {
merge {
cone {
<4.2,-0.6,-0.14>,0.1,
<4.2,0.9,-0.14>,0.1
}
cone {
<4.2,0.9,-0.14>,0.2,
<4.2,1.4,-0.14>,0
}
}
box {<-5,-5,-0.13>,<5,5,-0.15>}
pigment {color rgb <0.7,0.4,0.4>}
finish {ambient 0.5}
rotate <0, 0, 4*60+10>
}
merge {
cone {
<4.2,-0.6,-0.14>,0.02,
<4.2,0.9,-0.14>,0.02
}
cone {
<4.2,0.9,-0.14>,0.05,
<4.2,1.4,-0.14>,0
}
pigment {color rgb <1.0,0.7,0.7>}
finish {ambient 1}
rotate <0, 0, 4*60+10>
}

intersection {
merge {
cone {
<3.6,0.1,-0.14>,0.1,
<3.6,-0.65,-0.14>,0.1
}
cone {
<3.6,-0.65,-0.14>,0.2,
<3.6,-1.15,-0.14>,0
}
}
box {<-5,-5,-0.13>,<5,5,-0.15>}
pigment {color rgb <0.7,0.4,0.4>}
finish {ambient 0.5}
rotate <0, 0, 4*60-10>
}
merge {
cone {
<3.6,0.1,-0.14>,0.02,
<3.6,-0.65,-0.14>,0.02
}
cone {
<3.6,-0.65,-0.14>,0.05,
<3.6,-1.15,-0.14>,0
}
pigment {color rgb <1.0,0.7,0.7>}
finish {ambient 1}
rotate <0, 0, 4*60-10>
}

#end /* arrows */


#if (sky_flag)

#declare Orange_Yellow = color rgb <1,0.8,0.0>*0.7;

sphere{
<0,0,0>,1 hollow
texture{
pigment{
gradient <0,1,0>
turbulence 0.75
color_map{
[0 color White*0.7]
[0.8 color Orange_Yellow*0.7]
[1.0 color White*0.7]
}
quick_color White
scale 4
rotate<180,0,30>
}
finish {ambient 1 diffuse 0}
}
scale 10000
}

#end /* sky */


#if (components_flag)

#macro msina_comp (main_color,interface_color,comp_index)
merge {
cylinder {
<2,0,-0.5> <2,0,0.5> 1
texture{
Polished_Chrome
pigment{color interface_color}
finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0}
}
}
difference {
cylinder {
<-1.5,0,-0.51> <-1.5,0,0.51> 5
}
box {
<-6,0,-0.6>,<6,6,0.6>
rotate <0,0,30>
}
box {
<-6,0,-0.6>,<6,-6,0.6>
rotate <0,0,-30>
}
box {
<-6,-6,-0.6>,<1.5,6,0.6>
}
}
translate <1.5,0,0>
texture{
Polished_Chrome pigment{color main_color}
finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0}
}
rotate <0,0,comp_index*60>
}
#end /* msina_comp macro */

#macro msina_text (string, scale_value, trans_value)
text {
ttf myfont string 0.3, 0
pigment { White }
scale scale_value
translate trans_value
}
#end /* msina_text macro */

msina_text ("TCP", 0.8, <3.1,-0.25,-0.58>)
msina_comp (rgb <0.5,0.5,0.6>, rgb <0.7,0.4,0.0>, 0)

msina_text ("IP", 1, <1.5,3.1,-0.58>)
msina_comp (rgb <0.5,0.6,0.5>, rgb <0.7,0.4,0.0>, 1)

msina_text ("Krypto", 0.6, <-3,3.1,-0.58>)
msina_comp (rgb <0.6,0.5,0.6>, rgb <0.7,0.4,0.0>, 2)

msina_text ("Key", 0.5, <-4.5,0.25,-0.58>)
msina_text ("Manager", 0.5, <-4.8,-0.32,-0.58>)
msina_comp (rgb <0.4,0.6,0.6>, rgb <0.7,0.4,0.0>, 3)

msina_text ("Network", 0.6, <-3.2,-3.45,-0.58>)
msina_comp (rgbt <0.6,0.4,0.4,0.5>, rgbt <0.7,0.4,0.0,0.5>, 4)

msina_text ("Network", 0.6, <1.0,-3.45,-0.58>)
msina_comp (rgb <0.6,0.6,0.4>, rgb <0.7,0.4,0.0>, 5)

#end /* components */

@@end
@Maira_Nekomori Please show fedi some /raytrace
@@begin
#include "colors.inc"
#include "textures.inc"
#include "stones.inc"

camera {
location <-1.5,-1.5,-31>
look_at <-1.5,-1.5,0>
}

light_source {
<-5,5,-20>
color rgb <1,1,1>
}

sphere{<0,0,0>,1 hollow
texture{
pigment{gradient <0,1,0>
color_map{[0 color <0.0,0.0,0.0>]
[1 color <0.15,0.22,0.3>]}
}
finish {ambient 1 diffuse 0}
}
translate <0,0.5,0>
scale 10000
}

union{
#declare num_steps = 15000;
#declare alp = 0;
#declare alp_inc = 12*360/num_steps;
#declare bet = 0;
#declare bet_inc = 12*263/num_steps;
#declare gam = 0;
#declare gam_inc = 2*3.14/num_steps;
#declare dy = 40/num_steps;
#declare ypos = -20;
#while (ypos < 20)
sphere {
<0,0,0>, sin(gam)*sin(gam)
scale <0.2,1,1>
rotate <0,0,bet>
translate <7*sin(gam),ypos,0>
rotate <0,alp,0>
}
#declare alp = alp + alp_inc;
#declare bet = bet + bet_inc;
#declare gam = gam + gam_inc;
#declare ypos = ypos + dy;
#end
rotate <30,40,-30>
texture {Gold_Nugget}
}

@@end
Hey fedi!
@Maira_Nekomori /raytrace @@begin
// This work is licensed under the Creative Commons Attribution 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
// California, 94041, USA.

// Persistence Of Vision Ray Tracer Scene Description File
// File: radiosity2.pov
// Desc: radiosity tutorial scene
// Date: 2000-2001
// Auth: Christoph Hormann

// -w240 -h180 +a0.3

//#version 3.6;
#version 3.7;

#declare use_light=true;

global_settings {
assumed_gamma 1.0
radiosity {
pretrace_start 0.08
pretrace_end 0.04
count 35

nearest_count 5
error_bound 0.2
recursion_limit 1

low_error_factor .5
gray_threshold 0.0
minimum_reuse 0.015
brightness 1

adc_bailout 0.01/2

}
}

#if (use_light)
light_source {
<-1.5, 1, -0.5>*10000
color rgb <1.0, 0.92, 0.77>
}
#end

camera {
location <3.8, 7.8, -10>
look_at <0.0, 0.0, 0.0>
}


sphere {
<0, 0, 0>, 1
texture {
pigment {
gradient y
color_map {
[0.0 color rgb < 0.880, 0.935, 0.976 >]
[0.2 color rgb < 0.300, 0.450, 0.950 >]
}
}
finish { diffuse 0 #if (version < 3.7) ambient 1 #else emission 1 #end }
}
hollow on
no_shadow
scale 30000
}


#declare FinX= finish { diffuse 0.65 #if (version < 3.7) ambient 0 #end }

#declare Wing_Length=4;
#declare Wing_Round=1.2;
#declare Wing_Rad=0.4;

#declare Wing=
union {
cylinder { <0, 0, 0>, < 0, 0, Wing_Length>, Wing_Rad }
intersection {
torus { Wing_Round, Wing_Rad }
box { <0, -5, 0>, < 5, 5, 5> }
rotate 90*z
rotate 180*y
translate < 0, -Wing_Round, -Wing_Length>
}
cylinder { <0, -Wing_Round, -Wing_Length-Wing_Round>,
<0, -Wing_Round-10, -Wing_Length-Wing_Round>, Wing_Rad }
}

union {
superellipsoid { <0.7, 0.3>
texture {
pigment { color rgb <1.0, 0.7, 0.6> }
finish { FinX }
}
}
object { Wing }
object { Wing rotate 180*y }

torus { Wing_Length+Wing_Round, 0.5 translate (0.5-4)*y }
torus { Wing_Length+Wing_Round, 1.0 scale < 1, 0.1, 1> translate (0.5-4)*y
texture {
pigment { color rgb <1.0, 0.7, 0.6> }
finish { FinX }
}
}

cylinder { < 0, -4, 0>, < 0, -1, 0>, 1 }

sphere { < 0, 0, 0> 1
scale <1.7,0.2,1.7>
translate -1*y
}

box { <-2.8, -3.2, -2.8>, < 2.8, -3.1, 2.8> }

union {
cylinder { < -2, 0, 0>, < 2, 0, 0>, 1.0 }
sphere { < -2, 0, 0> 1.0 }
sphere { < 2, 0, 0> 1.0 }
scale < 1.2, 0.2, 1.2>
}

translate <0, 4, 0>

texture {
pigment { color rgb 1 }
finish { FinX }
}
}



plane {
y, 0
texture {
pigment { color rgb 1 }
finish { FinX }
}
}

@@end
creativecommons.orgCreative Commons — Attribution 3.0 Unported — CC BY 3.0