artemonigiri / console3d Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
В видео был пончик, а кода для него нет, что очень печально
Может код для пончиков, фракталов и других показанных вещей остался?
screen_s << "\033[48;2;" << color.r << ";" << color.g << ";" << color.b << "m "; // Set background color
Вот так можно устанавливать цвет в консоли, жду ответа
@ArtemOnigiri
Когда мы рассчитываем
intersection = box(ro, rd, 1, boxN);
,
одна из координат rd может быть нулевой. Тогда в строке
vec3 m = vec3(1.0) / rd;
будет деление на нуль.
Вот пример:
vec2 uv = vec2(58, 0) / vec2(116, 27) * 2 - 1;
// uv = vec2(0, -1)
vec2 rd = norm(vec3(2, uv));
// rd ~= vec3(0.97, 0, -0.24)
vec3 m = vec3(1.0) / rd;
// m = vec3(1.0 / 0.97, 1.0 / 0, 1.0 / -0.24);
// ~~~
при попытке запуска на CodeBlocks выдает ошибку \Console3D-\ConsoleRayTracing.cpp|86|error: cannot convert 'wchar_t*' to 'LPCSTR' {aka 'const char*'}|
Где кроссплатформенность
Memory had been allocated.
Console3D/ConsoleRayTracing.cpp
Line 31 in 9ce7d57
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.