{"id":26289856,"url":"https://github.com/2bt/bcrt","last_synced_at":"2025-12-29T17:51:42.491Z","repository":{"id":138954674,"uuid":"253557192","full_name":"2bt/bcrt","owner":"2bt","description":"Business card raytracer rendering SoundHound's Houndify logo ","archived":false,"fork":false,"pushed_at":"2024-01-29T20:02:25.000Z","size":1379,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-29T22:54:56.186Z","etag":null,"topics":["codegolf","houndify","raytracing","soundhound"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2bt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-04-06T16:38:27.000Z","updated_at":"2023-07-05T17:09:14.000Z","dependencies_parsed_at":"2024-01-29T21:26:49.691Z","dependency_job_id":"11f9975e-0b78-4142-8d89-e918136f2db4","html_url":"https://github.com/2bt/bcrt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2bt%2Fbcrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2bt%2Fbcrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2bt%2Fbcrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2bt%2Fbcrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2bt","download_url":"https://codeload.github.com/2bt/bcrt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658261,"owners_count":20326467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codegolf","houndify","raytracing","soundhound"],"created_at":"2025-03-14T23:16:35.497Z","updated_at":"2025-12-29T17:51:42.461Z","avatar_url":"https://github.com/2bt.png","language":"C++","readme":"# Business Card Raytracer\n\nThis little program renders [SoundHound's](https://www.soundhound.com/) Houndify logo.\n\n```c++\n#include\u003ccmath\u003e  // g++ -Ofast houndify.cpp -o houndify\n#include\u003ccstdio\u003e // ./houndify \u003e houndify.ppm\n#include\u003ccstdlib\u003e\n#define R {return\n#define S (F)rand()/RAND_MAX-.5\n#define P(x)putchar(c.x*263/(c.x+99))\n#define O(o)z=c;}V operator o(V r)R{r.x o x,r.y o y,r.z o z};}F\nusing F=double;F(*A)(F)=fabs,(*I)(F,F)=fmin,E=.01,x,y=720,a,n,i,j;struct V{V(F a\n,F b,F c=0){x=a;y=b;O(+)x,z,y;V(F c=0){x=y=O(*)operator-(F)R x+y+z;}}o;F L(V v)R\nsqrt(v*v-0);}V Z(V v)R v*(1/L(v));}V M(V p){V q=p;q.z=0;F l=L(q),f=I(I(I(L({p.x,\np.y+I(0,-I(p.y,18))})-9,-I(2-A(l-15),-p.y)),-I(2-A(p.x),5-A(p.y+20))),-I(8-A(p.x\n),2-A(p.y+24))),g=A(l-53)-8.1,m=g\u003cf?f=g,L(q*2+(p.x\u003ep.y?11:-11))\u003e107:-1;f=L({I(f,\n-1)-f,I(-p.z,4)+p.z})-1;g=I(-p.z,p.z+250);R{I(g,f),g\u003cf?8:m+2};}}int main(){V b=Z\n({-3,-1,7}),l=V(b.z,0,-b.x)*.001,u(b.y*l.z,b.z*l.x-b.x*l.z,-b.y*l.x),c,d,m,s;for\n(puts(\"P6 960 720 255\");y--;)for(x=960;x--;P(x),P(y),P(z))for(c=n=0;a=99\u003en++;c=c\n+(d.z\u003c-.8?V(9,6,3):d.y\u003e.3?V(3,4,6):0)*a)for(o={74,26,-170},d=Z(b+l*(S-x+480)+u*(\ny-360+S)),i=4;--i;){for(s=1,j=30;--j\u0026\u0026s.x\u003eE;)s=M(o=o+d*s.x);if(3e4\u003eo*o-0){for(j=\n6,a*=s.y/9;--j\u0026\u0026d*d-0\u003e.5;)d={S,S,S};m=Z(V(M(o+V(E,0)).x,M(o+V(0,E)).x,M(o+V(0,0,\nE)).x)+-s.x),d=Z(m*d-0\u003c0?d*-1:d),o=o+m*E;}}}\n```\n\n![houndify](houndify.jpg)\n\n\n# Business Card Speech Sample\n\nThis little program generates audio saying \"Houndify everything!\" Here's what it sounds like: [he.wav](he.wav).\n\n```c\n#include\u003cstdio.h\u003e/////////////////////////// gcc he.c -lm \u0026\u0026 ./a.out | aplay\n#include\u003cmath.h\u003e////////////////////////////////////////////////////////////\nunsigned long q[]={0x544767c0490c8b21,0x999bf5cf370a7602,0xff1aca05a12a29bb,\n0xde322b1fa794b7f4,0x77fc7058aa756118,0x54fe36dfaad5d5ef,0x98e12b0c6b899e73,\n0x54fe36dd35b607b0,0x32b350fd32e6bcba,0x98320ea9b0225220,0xdd7f1550fb4de141,\n0xbb341aad92e3d7ee,0x775508e0652b365f,0x544766d45e9027b3,0xdd82e4bfce3460ff,\n0xdd82bacf2cb306b3,0x54fa51c63ba9a6a8,0x31f48dba868b172a,0x98ec9c128c83ccb0,\n0x769a15f8746ef3e9,0x5447665bd9dfafe4,0x31f4a3602bc4faa8,0x54fe4b9e275c2ed1,\n0xbb30206739932361,0x98e525505e46c574,0x769a3fe3f6c9273c,0x538c9e4650b56d57,\n0x31f4781756b6c763,0x32a02c691f3b2e65,0},f,s,i,t;float x,y,o,g,p,w,a;main(k)\n{for(;t=q[s++/333];p+=w,putchar(128+o*f*f/20))for(w=t%47/1e2,i=o=0;a=i*w\u003c3;o\n+=sin(p*i++)/sqrt(x*x+y*y))for(k=x=y=.1,f=t;f\u003e8;f/=47,a=f%47*.191-4)x+=a*cos\n(g=i*w*k++),y+=a*sin(g);}///////////////////////////////////////////////////\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2bt%2Fbcrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2bt%2Fbcrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2bt%2Fbcrt/lists"}