Search found 1615 matches
Re: Squares
I'm addicted to suspicious pointer assignments. Having a look at your rotator code. '' A GradientRibbon can be made of many small linear gradient runs '' This defines max length of a run Type t_grPixelRun As UShort '' The calculation for a run is: SuperSample * (lenBaseUB + lenVari) '' .. so .. 256 ...
Re: Squares
What slowed his laptop down was the trig calc. This is what prompted discussion of spreading calculation over several frames.
Dodicat, your cube and sphere look really cool with a radius about half size
Dodicat, your cube and sphere look really cool with a radius about half size
Re: Squares
What slowed his laptop down was the trig calc. This is what prompted discussion of spreading calculation over several frames.
Dodicat, your cube and sphere look really cool with a radius about half size
Dodicat, your cube and sphere look really cool with a radius about half size
Re: Squares
excellent. I'm seeing progress on my new framework. dodicat's macro knowledge and Stonemonkey's super-clean code helps me simplify my own style #Ifndef FALSE Const FALSE = 0 Const TRUE = not FALSE #EndIf type tFPUMODE '' http://www.freebasic.net/forum/viewtopic.php?f=3&t=20669#p181983 '' 0=neare...
- Jan 28, 2013 9:15
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
Re: mismatch inside macro
Thank you. I'm guessing that cast has 2 purposes.
1. lets u do things u normally couldn't do (of which I am not aware of)
2. error suppression
1. lets u do things u normally couldn't do (of which I am not aware of)
2. error suppression
Re: Squares
Ah. I think it's a trick your brain is playing. Mine does the same. If you slowed the rotation, it would give our brains time to "aha."
Re: Squares
I changed Dim As rotation_axis axis: axis.z = 500 and the object appears closer. is that what you mean? Actually, it isn't. You mean point z. I'm working on a new "barebones" plotter, switching around some things. I think it'll fix what you're talking about. But keep in mind that if the ax...
- Jan 28, 2013 4:01
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
- Jan 28, 2013 0:32
- Forum: Sources, Examples, Tips and Tricks
- Topic: Sort Array
- Replies: 62
- Views: 16983
Re: Sort Array
@Roe5685 - actually, my string compare is not showing speed improvement over the combsort4 I posted. What I've done is create a natural sort, ie. "2" is not greater than "10" ' sort macro v0.99 (2014 March 28) by dafhi ' Usage: ' 1. sort(arr,.field3) ' member ' 2. sort(arr,) ' pl...
- Jan 28, 2013 0:17
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
Re: mismatch inside macro
ooh .. that works. thank you both. fxm also gives good information, and I shall research compiler options if I find the need. the reason an error is raised in my code is I'm using ByRef as string in my More() and Less() functions I'm surprised at some scoping things. such as this, which gets a dupli...
- Jan 27, 2013 22:36
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
Re: mismatch inside macro
there is no error. it's a scoping issue. in the top If section, strings are handled. It the bottom, numeric. The top section never "sees" numerics .. #Macro combsort4(array,begin,finish,dot) Scope Dim As TypeOf(array(begin)dot) swap_var If Len(swap_var) = 0 Then comb_sortstring(array,begin...
- Jan 27, 2013 22:20
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
Re: mismatch inside macro
The top If uses my string compare function: More(ByRef .. as string). #Macro combsort4(array,begin,finish,dot) Scope Dim As TypeOf(array(begin)dot) swap_var If Len(swap_var) = 0 Then '' If More(array(i)dot,array(j)dot) .. comb_sortstring(array,begin,finish,dot,swap_var) Else '' If array(i)dot>array(...
- Jan 27, 2013 21:53
- Forum: General
- Topic: mismatch inside macro
- Replies: 11
- Views: 583
mismatch inside macro
I made a string compare, and want to create a general sort macro: #Macro combsort4(array,begin,finish,dot) Dim As TypeOf(array(begin)dot) swap_var If Len(swap_var) = 0 Then '' If More(array(i)dot,array(i+gap)dot) .. comb_sortstring(array,begin,finish,dot,swap_var) Else '' If array(i)dot>array(i+gap)...
Re: Squares
I forgot: MacroHSV(y1,x1,z1) End If #EndMacro const num_formulas = 6 and main: if (morph>1) then if (cloud(index_a)->modify=0) then curr_formula += 1 If curr_formula > num_formulas Then curr_formula = 0 cloud(index_a)->modify=1 cloud(index_a)->modify_vertex=cloud(index_a)->first_cloud_vertex cloud(i...
- Jan 27, 2013 19:52
- Forum: Sources, Examples, Tips and Tricks
- Topic: Sort Array
- Replies: 62
- Views: 16983
Re: Sort Array
this comb is a little faster. many thanks to dodicat for his brilliant macro work. I have a string compare that's much faster than the built-in .. it's 600+ lines though. #Macro combsort(array,begin,finish,dot) Scope Var size=(finish),switch=0,j=0 Dim As Single void=size Do void=void/1.3: If void<1 ...