Search found 1221 matches

by dafhi
Oct 08, 2018 0:29
Forum: Projects
Topic: 3D Playground
Replies: 26
Views: 1782

Re: 3D Playground

I'll adopt S.O.L.I.D. and anything else you can throw at me once my brain decides to flip on. I love these amazing concepts you present
by dafhi
Oct 05, 2018 14:35
Forum: Community Discussion
Topic: my best effort
Replies: 123
Views: 5299

Re: my best effort

owen, seeing progress of your efforts is beneficial
by dafhi
Oct 05, 2018 14:23
Forum: Tips and Tricks
Topic: period modulation (windows audio)
Replies: 4
Views: 391

Re: period modulation (windows audio)

fixed
by dafhi
Oct 04, 2018 22:27
Forum: Tips and Tricks
Topic: period modulation (windows audio)
Replies: 4
Views: 391

period modulation (windows audio)

/' period modulation - Windows audio demo by dafhi - 2018 Oct 19 Info: experimenting with waveforms in a software synthesizer, I discovered this algorithm which produces a signal that sounds like it converges to noise. Harmonics in the beginning are wonderfully complex, and I made some parameters f...
by dafhi
Oct 04, 2018 20:43
Forum: General
Topic: How to make a trangle wave U = f(t)
Replies: 8
Views: 478

Re: How to make a trangle wave U = f(t)

i made this #Ifndef floor '' http://www.freebasic.net/forum/viewtopic.php?p=118633 #Define floor(x) (((x)*2.0-0.5)shr 1) #define ceil(x) (-((-(x)*2.0-0.5)shr 1)) #EndIf function tri_wave(i as single, m as single = 4)as single i = i - m*floor(i / m) '' int() is notoriously slow if i > .75*m then retu...
by dafhi
Oct 04, 2018 12:25
Forum: General
Topic: raytrace try
Replies: 24
Views: 1434

Re: raytrace try

dodicat that's very nice. i'll have a look ray tracing is a lot different than ray marching I only know the sphere '' bluatigro 3 okt 2018 '' slow ray 1 '' this can be speeded up if i undestand : ''https://www.cl.cam.ac.uk/teaching/1999/AGraphHCI/SMAG/node2.html#SECTION00023100000000000000 type d3d ...
by dafhi
Oct 04, 2018 5:22
Forum: General
Topic: raytrace try
Replies: 24
Views: 1434

Re: raytrace try

Stonemonkey, good to see you! rough reflections (from my path tracer) function tracer.norm_scatter(rayd as v3, abscosi as single, k as single) as v3 ' Maths description: ' randomize the reflection normal in a cone ' at minimum roughness (k=0), cone center is parallel with surface normal. the cone sp...
by dafhi
Oct 03, 2018 22:33
Forum: General
Topic: raytrace try
Replies: 24
Views: 1434

Re: raytrace try

it looks like you're performing a variation of ray marching avoid sqr() and ^ function tsphere.hit( nu as d3d ) as integer nu = nu - c return ( nu.x*nu.x + nu.y*nu.y + nu.z*nu.z) < d*d 'return sqr( nu.x ^ 2 + nu.y ^ 2 + nu.z ^ 2 ) < d end function dnu += d3d( .5 , .5 , .5 )
by dafhi
Oct 03, 2018 3:02
Forum: Windows
Topic: gcc 5.2 vs gcc 8.1
Replies: 64
Views: 3372

Re: gcc 5.2 vs gcc 8.1

it's my understanding that fbc compiles itself, and has a c emitter
by dafhi
Oct 03, 2018 2:35
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

just a quick update .. your other example i think is perfect
I simply haven't devoted enough time looking at it.

i will continue to read all examples
by dafhi
Oct 02, 2018 14:08
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

my starting point, following your example (paul) probably is something like this Ok, so you're trying to abstract the screen into a class, and then use other objects (such as images) to perform several other tasks (blitting, etc.). All this with the purpose of implementing a fully abstract renderer...
by dafhi
Oct 02, 2018 8:07
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

I'd forgotten about the destructors. I have adhd or something but i'll get through this. I'm trying to refactor so that I'll be able to continue simply: sprite.blit @buf my starting point, following your example (paul) probably is something like this type IimageVars extends object declare virtual de...
by dafhi
Oct 01, 2018 22:10
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

on the topic of memory leaks, in paul's example i *might* be seeing a sketchy scenario dim as IRenderableShape ptr renderableShapes( ... ) = { _ .. , _ new RenderableRectangleWithBorder( _ new RenderableRectangle( rectangles( 1 ), colors.red ), _ 5, colors.yellow ), _ and in the cleanup code, i'm th...
by dafhi
Sep 30, 2018 23:34
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

progress report /' '/ type IimageVars extends object declare virtual destructor declare abstract property pixels() as any ptr as integer w, h, bypp, pitch protected: declare constructor End Type constructor IimageVars end constructor destructor IimageVars end destructor /' '/ type IImage extends Iim...
by dafhi
Sep 28, 2018 21:07
Forum: Community Discussion
Topic: SOLID programming
Replies: 75
Views: 2961

Re: SOLID programming

very nice. thanks for sharing

Go to advanced search