forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Combinations...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Thu Jul 17, 2003 1:27 am    Post subject: Reply with quote

I think if U can use API there thing can be very fast. I have not looked into if and how it is possible. Just a thought - as for Ur calculations.

But for your screen saver for such real time graphics - U can look into DirectX. I know it is a difficult area and getting it work in VDS even more difficult unless U write a dll to interface. (and BTW i am stuck at a simpler prototype with Wavemix.dll.)

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension


Last edited by CodeScript on Thu Jul 17, 2003 2:12 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jul 17, 2003 2:05 am    Post subject: Reply with quote

hi ff,

if no-one beats me to it, i'll put together some code for you that will generate all #|#|#|# combinations

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jul 17, 2003 11:42 am    Post subject: Reply with quote

@Codescript:

I'll look into this

@Serge:

I would really like that... this is going over my head until I study it again.
I don't know why I can't figure it out. Mad

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jul 17, 2003 2:48 pm    Post subject: Reply with quote

here you go ff,

Code:

%%lower = 0
%%upper = 256

%i = %%lower
  repeat
      %j = %%lower
      repeat
       %k = %%lower
       repeat
          %m = %%lower
         repeat
              list add, list1, %i|%j|%k|%m
                                     %m = @succ(%m)
                           until @greater(%m,%%upper)
                %k = @succ(%k)
        until @greater(%k,%%upper)
        %j = @succ(%j)
    until @greater(%j,%%upper) 
    %i = @succ(%i)
  until @greater(%i,%%upper)


list1 will contain all the combinations from 0 to 256

%%lower contains the smallest number to start from

%%upper contains the highest number to go to

i have found, on my laptop, that i cannot use a list as it runs out of memory very quickly...it can cope with 10,000 items (%%upper=10) but not when you set %%upper to 12

i built an interface that would list all the combinations (memory allowing) and that could either copy the list to the clipboard or save the list as a text file...let me know if you could use something like that

let me know if i can help you with anything else

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 17, 2003 2:49 pm    Post subject: Reply with quote

You mean something like this?

Code:
%1 = 0
%2 = 0
%3 = 0
%4 = 0

list create,1

repeat
%2 = 0
  repeat 
  %3 = 0
    repeat
    %4 = 0 
      repeat   
      list add,1,%1|%2|%3|%4
      %4 = @succ(%4)
      until @equal(%4,256)
    %3 = @succ(%3)
    until @equal(%3,256) 
  %2 = @succ(%2)
  until @equal(%2,256)
%1 = @succ(%1)
until @equal(%1,256)

rem Now every combination is in @text(1)
 
list close,1


Edit1: Oops, sorry Serge, I haven't seen your post... Embarassed

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!


Last edited by Skit3000 on Thu Jul 17, 2003 5:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Jul 17, 2003 2:56 pm    Post subject: Reply with quote

It seems that you are going to need much more than 32 GB (!) of memory for such a list... Shocked

256 * 256 * 256 * 256 * 8 bytes = 34'359'738'368 bytes
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 17, 2003 2:58 pm    Post subject: Reply with quote

I thought about that too, so I didn't run it.. Smile Btw, you'll need even more memory, because the pipe character is added too... Wink
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Jul 17, 2003 3:03 pm    Post subject: Reply with quote

If it is colour you are after, can you not use:

#ffffff HTML colour refernces instead?

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jul 17, 2003 4:05 pm    Post subject: Reply with quote

Woo! Shocked Better just try it a different way. Thanks a lot for all of the
help everyone. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Thu Jul 17, 2003 4:49 pm    Post subject: Reply with quote

I again think if U are manipulating colors and shades 3D etc involving such large data realtime - Direct X or open GL something like that.
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group